Replace string arguments with char
Optimize method calls by replacing single character String arguments with char. Closes gh-11680
This commit is contained in:
committed by
Phillip Webb
parent
2735f57b0d
commit
b19dcb13e2
@@ -176,7 +176,7 @@ public class JavaCompilerFieldValuesParser implements FieldValuesParser {
|
||||
Object instance = expression.getInstance();
|
||||
if (instance != null && instance.toString().startsWith(DURATION_OF)) {
|
||||
String type = instance.toString();
|
||||
type = type.substring(DURATION_OF.length(), type.indexOf("("));
|
||||
type = type.substring(DURATION_OF.length(), type.indexOf('('));
|
||||
String suffix = DURATION_SUFFIX.get(type);
|
||||
return (suffix == null ? null : factoryValue + suffix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user