From 2eb0ba384348137a4e010240b4ab33af0c7d5ea4 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 27 May 2026 16:29:51 +0200 Subject: [PATCH] Fix MethodParameter nestingLevel documentation Closes gh-36826 (cherry picked from commit 3e585830d7d7615d7092d9111151fb76c131fdef) --- .../org/springframework/core/MethodParameter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/MethodParameter.java b/spring-core/src/main/java/org/springframework/core/MethodParameter.java index 6ff08da81ac..2f39142bf33 100644 --- a/spring-core/src/main/java/org/springframework/core/MethodParameter.java +++ b/spring-core/src/main/java/org/springframework/core/MethodParameter.java @@ -121,8 +121,8 @@ public class MethodParameter { * return type; 0 for the first method parameter; 1 for the second method * parameter, etc. * @param nestingLevel the nesting level of the target type - * (typically 1; for example, in case of a List of Lists, 1 would indicate the - * nested List, whereas 2 would indicate the element of the nested List) + * (1 for the top-level type; in case of a List of Lists, 2 would indicate + * the nested List, whereas 3 would indicate the element of the nested List) */ public MethodParameter(Method method, int parameterIndex, int nestingLevel) { Assert.notNull(method, "Method must not be null"); @@ -145,8 +145,8 @@ public class MethodParameter { * @param constructor the Constructor to specify a parameter for * @param parameterIndex the index of the parameter * @param nestingLevel the nesting level of the target type - * (typically 1; for example, in case of a List of Lists, 1 would indicate the - * nested List, whereas 2 would indicate the element of the nested List) + * (1 for the top-level type; in case of a List of Lists, 2 would indicate + * the nested List, whereas 3 would indicate the element of the nested List) */ public MethodParameter(Constructor constructor, int parameterIndex, int nestingLevel) { Assert.notNull(constructor, "Constructor must not be null"); @@ -296,8 +296,8 @@ public class MethodParameter { /** * Return the nesting level of the target type - * (typically 1; for example, in case of a List of Lists, 1 would indicate the - * nested List, whereas 2 would indicate the element of the nested List). + * (1 for the top-level type; in case of a List of Lists, 2 would indicate + * the nested List, whereas 3 would indicate the element of the nested List). */ public int getNestingLevel() { return this.nestingLevel;