From 26d1c38d84a20dab5f3f6a92db2aaa4f53ecef08 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 24 May 2024 13:05:49 +0200 Subject: [PATCH] Polishing --- .../java/org/springframework/beans/BeanUtilsTests.java | 7 +++---- .../org/springframework/core/BridgeMethodResolver.java | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java index 518b686cc2..09edd5cf1a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java @@ -344,7 +344,7 @@ class BeanUtilsTests { } @Test // gh-32888 - public void copyPropertiesWithGenericCglibCLass() { + public void copyPropertiesWithGenericCglibClass() { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(User.class); enhancer.setCallback((MethodInterceptor) (obj, method, args, proxy) -> proxy.invokeSuper(obj, args)); @@ -934,6 +934,7 @@ class BeanUtilsTests { private static class Order { private String id; + private List lineItems; Order() { @@ -999,10 +1000,8 @@ class BeanUtilsTests { private static class GenericBaseModel { - public GenericBaseModel() { - } - private T id; + private String name; public T getId() { diff --git a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java index c7924a87eb..10388c522d 100644 --- a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java +++ b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java @@ -79,9 +79,9 @@ public final class BridgeMethodResolver { * method has been generated at the same class hierarchy level (a known difference * between the Eclipse compiler and regular javac). * @param bridgeMethod the method to introspect against the given target class - * @param targetClass the target class to find methods on - * @return the original method (either the bridged method or the passed-in method - * if no more specific one could be found) + * @param targetClass the target class to find the most specific method on + * @return the most specific method corresponding to the given bridge method + * (can be the original method if no more specific one could be found) * @since 6.1.3 * @see #findBridgedMethod * @see org.springframework.util.ClassUtils#getMostSpecificMethod