Skip to content

Commit

Permalink
move lock in DeserializerCache to before the try block (#4560)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Jun 5, 2024
1 parent 732a26c commit fe8ce08
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,8 @@ protected JsonDeserializer<Object> _createAndCacheValueDeserializer(Deserializat
* limitations necessary to ensure that only completely initialized ones
* are visible and used.
*/
_incompleteDeserializersLock.lock();
try {
_incompleteDeserializersLock.lock();

// Ok, then: could it be that due to a race condition, deserializer can now be found?
JsonDeserializer<Object> deser = _findCachedDeserializer(type);
if (deser != null) {
Expand Down

0 comments on commit fe8ce08

Please sign in to comment.