diff --git a/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java b/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java index 10dccab9487637bbac852dc37c7645c5d56823b5..44781d9a4a51549e0ffd0cf4181713d8256d773c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java +++ b/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java @@ -33,6 +33,7 @@ import java.util.WeakHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.io.support.SpringFactoriesLoader; import org.springframework.util.ClassUtils; @@ -265,8 +266,9 @@ public class CachedIntrospectionResults { // This call is slow so we do it once. PropertyDescriptor[] pds = this.beanInfo.getPropertyDescriptors(); for (PropertyDescriptor pd : pds) { - if (Class.class.equals(beanClass) && "classLoader".equals(pd.getName())) { - // Ignore Class.getClassLoader() method - nobody needs to bind to that + if (Class.class.equals(beanClass) && + ("classLoader".equals(pd.getName()) || "protectionDomain".equals(pd.getName()))) { + // Ignore Class.getClassLoader() and getProtectionDomain() methods - nobody needs to bind to those continue; } if (logger.isTraceEnabled()) {