Skip to content

Commit

Permalink
api
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-cherednik committed Jan 3, 2024
1 parent d6be0e4 commit e0ab06f
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ final class EnumIdDeserializers extends SimpleDeserializers {
private final Map<Class<?>, JsonDeserializer<?>> cache = new HashMap<>();

@Override
public JsonDeserializer<?> findEnumDeserializer(Class<?> type,
DeserializationConfig config,
BeanDescription beanDesc) throws JsonMappingException {
public synchronized JsonDeserializer<?> findEnumDeserializer(Class<?> type,
DeserializationConfig config,
BeanDescription beanDesc) throws JsonMappingException {
return cache.computeIfAbsent(type, cls -> {
Function<String, ?> read = EnumIdSupport.createFactory(type);

Expand All @@ -68,7 +68,6 @@ public Object getNullValue(DeserializationContext ctxt) throws JsonMappingExcept
}
};
});

}

}

0 comments on commit e0ab06f

Please sign in to comment.