Skip to content

Commit 1d2b5a1

Browse files
committed
Polishing
1 parent 4baad16 commit 1d2b5a1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,15 @@ private static boolean isFirstEntryInArray(Object value, @Nullable Object possib
440440
}
441441

442442
/**
443-
* Package up the arguments so that they correctly match what is expected in requiredParameterTypes.
444-
* <p>For example, if requiredParameterTypes is {@code (int, String[])} because the second parameter
445-
* was declared {@code String...}, then if arguments is {@code [1,"a","b"]} then it must be
446-
* repackaged as {@code [1,new String[]{"a","b"}]} in order to match the expected types.
443+
* Package up the supplied {@code args} so that they correctly match what is
444+
* expected in {@code requiredParameterTypes}.
445+
* <p>For example, if {@code requiredParameterTypes} is {@code (int, String[])}
446+
* because the second parameter was declared as {@code String...}, then if
447+
* {@code args} is {@code [1, "a", "b"]} it must be repackaged as
448+
* {@code [1, new String[] {"a", "b"}]} in order to match the expected types.
447449
* @param requiredParameterTypes the types of the parameters for the invocation
448-
* @param args the arguments to be setup ready for the invocation
449-
* @return a repackaged array of arguments where any varargs setup has been done
450+
* @param args the arguments to be set up for the invocation
451+
* @return a repackaged array of arguments where any varargs setup has performed
450452
*/
451453
public static Object[] setupArgumentsForVarargsInvocation(Class<?>[] requiredParameterTypes, Object... args) {
452454
// Check if array already built for final argument

0 commit comments

Comments
 (0)