Skip to content

Commit d5ccb0c

Browse files
authored
remove synchronization from CsvMapper (#468)
1 parent 916c924 commit d5ccb0c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

csv/src/main/java/com/fasterxml/jackson/dataformat/csv/CsvMapper.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,19 +472,15 @@ protected CsvSchema _schemaFor(JavaType pojoType, LRUMap<ViewKey,CsvSchema> sche
472472
boolean typed, Class<?> view)
473473
{
474474
final ViewKey viewKey = new ViewKey(pojoType, view);
475-
synchronized (schemas) {
476-
CsvSchema s = schemas.get(viewKey);
477-
if (s != null) {
478-
return s;
479-
}
475+
CsvSchema s = schemas.get(viewKey);
476+
if (s != null) {
477+
return s;
480478
}
481479
final AnnotationIntrospector intr = _deserializationConfig.getAnnotationIntrospector();
482480
CsvSchema.Builder builder = CsvSchema.builder();
483481
_addSchemaProperties(builder, intr, typed, pojoType, null, view);
484482
CsvSchema result = builder.build();
485-
synchronized (schemas) {
486-
schemas.put(viewKey, result);
487-
}
483+
schemas.put(viewKey, result);
488484
return result;
489485
}
490486

0 commit comments

Comments
 (0)