Skip to content

Commit 2c85be3

Browse files
committed
Filter synthetic in ReflectionUtils#USER_DECLARED_METHODS
Issue: SPR-16823
1 parent e0ccbcb commit 2c85be3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -862,10 +862,10 @@ public interface FieldFilter {
862862

863863

864864
/**
865-
* Pre-built MethodFilter that matches all non-bridge methods
865+
* Pre-built MethodFilter that matches all non-bridge non-synthetic methods
866866
* which are not declared on {@code java.lang.Object}.
867867
*/
868868
public static final MethodFilter USER_DECLARED_METHODS =
869-
(method -> (!method.isBridge() && method.getDeclaringClass() != Object.class));
869+
(method -> (!method.isBridge() && !method.isSynthetic() && method.getDeclaringClass() != Object.class));
870870

871871
}

0 commit comments

Comments
 (0)