Consistent Class array vs vararg declarations (and related polishing)

(cherry picked from commit 3b810f3)
This commit is contained in:
Juergen Hoeller
2018-02-14 14:44:00 +01:00
parent 5ba37762fe
commit 722cb36e01
40 changed files with 486 additions and 489 deletions

View File

@@ -1052,7 +1052,7 @@ expression string.
StandardEvaluationContext context = new StandardEvaluationContext();
context.registerFunction("reverseString",
StringUtils.class.getDeclaredMethod("reverseString", new Class[] { String.class }));
StringUtils.class.getDeclaredMethod("reverseString", String.class));
String helloWorldReversed = parser.parseExpression(
"#reverseString('hello')").getValue(context, String.class);

View File

@@ -313,13 +313,13 @@ Note that we can achieve the same with java-based configurations:
@Override
protected Class<?>[] getRootConfigClasses() {
// GolfingAppConfig defines beans that would be in root-context.xml
return new Class[] { GolfingAppConfig.class };
return new Class<?>[] { GolfingAppConfig.class };
}
@Override
protected Class<?>[] getServletConfigClasses() {
// GolfingWebConfig defines beans that would be in golfing-servlet.xml
return new Class[] { GolfingWebConfig.class };
return new Class<?>[] { GolfingWebConfig.class };
}
@Override
@@ -4702,7 +4702,7 @@ This is recommended for applications that use Java-based Spring configuration:
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[] { MyWebConfig.class };
return new Class<?>[] { MyWebConfig.class };
}
@Override