Consistent Class array vs vararg declarations (and related polishing)
(cherry picked from commit 3b810f3)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user