Align plain accessor check
This commit is contained in:
parent
3b4ae7b028
commit
949c3d450c
|
@ -367,7 +367,7 @@ public final class CachedIntrospectionResults {
|
||||||
|
|
||||||
for (Method method : beanClass.getMethods()) {
|
for (Method method : beanClass.getMethods()) {
|
||||||
if (!this.propertyDescriptors.containsKey(method.getName()) &&
|
if (!this.propertyDescriptors.containsKey(method.getName()) &&
|
||||||
!readMethodNames.contains((method.getName())) && isPlainAccessor(method)) {
|
!readMethodNames.contains(method.getName()) && isPlainAccessor(method)) {
|
||||||
this.propertyDescriptors.put(method.getName(),
|
this.propertyDescriptors.put(method.getName(),
|
||||||
new GenericTypeAwarePropertyDescriptor(beanClass, method.getName(), method, null, null));
|
new GenericTypeAwarePropertyDescriptor(beanClass, method.getName(), method, null, null));
|
||||||
readMethodNames.add(method.getName());
|
readMethodNames.add(method.getName());
|
||||||
|
@ -376,8 +376,11 @@ public final class CachedIntrospectionResults {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPlainAccessor(Method method) {
|
private boolean isPlainAccessor(Method method) {
|
||||||
if (method.getParameterCount() > 0 || method.getReturnType() == void.class ||
|
if (Modifier.isStatic(method.getModifiers()) ||
|
||||||
method.getDeclaringClass() == Object.class || Modifier.isStatic(method.getModifiers())) {
|
method.getDeclaringClass() == Object.class || method.getDeclaringClass() == Class.class ||
|
||||||
|
method.getParameterCount() > 0 || method.getReturnType() == void.class ||
|
||||||
|
ClassLoader.class.isAssignableFrom(method.getReturnType()) ||
|
||||||
|
ProtectionDomain.class.isAssignableFrom(method.getReturnType())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue