diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index 26c8e92049..33c70920d1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -598,6 +598,8 @@ public abstract class BeanUtils { * @return the parameter names (matching the constructor's parameter count) * @throws IllegalStateException if the parameter names are not resolvable * @since 5.3 + * @see ConstructorProperties + * @see DefaultParameterNameDiscoverer */ public static String[] getParameterNames(Constructor ctor) { ConstructorProperties cp = ctor.getAnnotation(ConstructorProperties.class); diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java index 5d06665962..72baeca5ec 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessor.java @@ -16,7 +16,6 @@ package org.springframework.web.method.annotation; -import java.beans.ConstructorProperties; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -36,9 +35,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.TypeMismatchException; -import org.springframework.core.DefaultParameterNameDiscoverer; import org.springframework.core.MethodParameter; -import org.springframework.core.ParameterNameDiscoverer; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -189,7 +186,7 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol * with subsequent parameter binding through bean properties (unless suppressed). *

The default implementation typically uses the unique public no-arg constructor * if available but also handles a "primary constructor" approach for data classes: - * It understands the JavaBeans {@link ConstructorProperties} annotation as well as + * It understands the JavaBeans {@code ConstructorProperties} annotation as well as * runtime-retained parameter names in the bytecode, associating request parameters * with constructor arguments by name. If no such constructor is found, the default * constructor will be used (even if not public), assuming subsequent bean property