@@ -188,13 +188,13 @@ static CachedIntrospectionResults forClass(Class<?> beanClass) throws BeansExcep
188
188
results = new CachedIntrospectionResults (beanClass );
189
189
if (ClassUtils .isCacheSafe (beanClass , CachedIntrospectionResults .class .getClassLoader ()) ||
190
190
isClassLoaderAccepted (beanClass .getClassLoader ())) {
191
- strongClassCache .put (beanClass , results );
191
+ strongClassCache .putIfAbsent (beanClass , results );
192
192
}
193
193
else {
194
194
if (logger .isDebugEnabled ()) {
195
195
logger .debug ("Not strongly caching class [" + beanClass .getName () + "] because it is not cache-safe" );
196
196
}
197
- softClassCache .put (beanClass , results );
197
+ softClassCache .putIfAbsent (beanClass , results );
198
198
}
199
199
return results ;
200
200
}
@@ -295,7 +295,7 @@ private CachedIntrospectionResults(Class<?> beanClass) throws BeansException {
295
295
"; editor [" + pd .getPropertyEditorClass ().getName () + "]" : "" ));
296
296
}
297
297
pd = buildGenericTypeAwarePropertyDescriptor (beanClass , pd );
298
- this .propertyDescriptorCache .put (pd .getName (), pd );
298
+ this .propertyDescriptorCache .putIfAbsent (pd .getName (), pd );
299
299
}
300
300
301
301
this .typeDescriptorCache = new ConcurrentHashMap <PropertyDescriptor , TypeDescriptor >();
@@ -348,7 +348,7 @@ private PropertyDescriptor buildGenericTypeAwarePropertyDescriptor(Class<?> bean
348
348
}
349
349
350
350
void addTypeDescriptor (PropertyDescriptor pd , TypeDescriptor td ) {
351
- this .typeDescriptorCache .put (pd , td );
351
+ this .typeDescriptorCache .putIfAbsent (pd , td );
352
352
}
353
353
354
354
TypeDescriptor getTypeDescriptor (PropertyDescriptor pd ) {
0 commit comments