@@ -247,20 +247,17 @@ private static boolean isUnderneathClassLoader(@Nullable ClassLoader candidate,
247
247
/**
248
248
* Retrieve a {@link BeanInfo} descriptor for the given target class.
249
249
* @param beanClass the target class to introspect
250
- * @param ignoreBeaninfoClasses whether to apply {@link Introspector#IGNORE_ALL_BEANINFO} mode
251
250
* @return the resulting {@code BeanInfo} descriptor (never {@code null})
252
251
* @throws IntrospectionException from the underlying {@link Introspector}
253
252
*/
254
- private static BeanInfo getBeanInfo (Class <?> beanClass , boolean ignoreBeaninfoClasses )
255
- throws IntrospectionException {
256
-
253
+ private static BeanInfo getBeanInfo (Class <?> beanClass ) throws IntrospectionException {
257
254
for (BeanInfoFactory beanInfoFactory : beanInfoFactories ) {
258
255
BeanInfo beanInfo = beanInfoFactory .getBeanInfo (beanClass );
259
256
if (beanInfo != null ) {
260
257
return beanInfo ;
261
258
}
262
259
}
263
- return (ignoreBeaninfoClasses ?
260
+ return (shouldIntrospectorIgnoreBeaninfoClasses ?
264
261
Introspector .getBeanInfo (beanClass , Introspector .IGNORE_ALL_BEANINFO ) :
265
262
Introspector .getBeanInfo (beanClass ));
266
263
}
@@ -286,7 +283,7 @@ private CachedIntrospectionResults(Class<?> beanClass) throws BeansException {
286
283
if (logger .isTraceEnabled ()) {
287
284
logger .trace ("Getting BeanInfo for class [" + beanClass .getName () + "]" );
288
285
}
289
- this .beanInfo = getBeanInfo (beanClass , shouldIntrospectorIgnoreBeaninfoClasses );
286
+ this .beanInfo = getBeanInfo (beanClass );
290
287
291
288
if (logger .isTraceEnabled ()) {
292
289
logger .trace ("Caching PropertyDescriptors for class [" + beanClass .getName () + "]" );
@@ -318,9 +315,7 @@ private CachedIntrospectionResults(Class<?> beanClass) throws BeansException {
318
315
Class <?>[] ifcs = clazz .getInterfaces ();
319
316
for (Class <?> ifc : ifcs ) {
320
317
if (!ClassUtils .isJavaLanguageInterface (ifc )) {
321
- BeanInfo ifcInfo = getBeanInfo (ifc , true );
322
- PropertyDescriptor [] ifcPds = ifcInfo .getPropertyDescriptors ();
323
- for (PropertyDescriptor pd : ifcPds ) {
318
+ for (PropertyDescriptor pd : getBeanInfo (ifc ).getPropertyDescriptors ()) {
324
319
if (!this .propertyDescriptorCache .containsKey (pd .getName ())) {
325
320
pd = buildGenericTypeAwarePropertyDescriptor (beanClass , pd );
326
321
this .propertyDescriptorCache .put (pd .getName (), pd );
0 commit comments