Browse Source

Filter synthetic in ReflectionUtils#USER_DECLARED_METHODS

Issue: SPR-16823
pull/1828/merge
Sebastien Deleuze 7 years ago
parent
commit
2c85be333c
  1. 4
      spring-core/src/main/java/org/springframework/util/ReflectionUtils.java

4
spring-core/src/main/java/org/springframework/util/ReflectionUtils.java

@ -862,10 +862,10 @@ public abstract class ReflectionUtils { @@ -862,10 +862,10 @@ public abstract class ReflectionUtils {
/**
* Pre-built MethodFilter that matches all non-bridge methods
* Pre-built MethodFilter that matches all non-bridge non-synthetic methods
* which are not declared on {@code java.lang.Object}.
*/
public static final MethodFilter USER_DECLARED_METHODS =
(method -> (!method.isBridge() && method.getDeclaringClass() != Object.class));
(method -> (!method.isBridge() && !method.isSynthetic() && method.getDeclaringClass() != Object.class));
}

Loading…
Cancel
Save