Remove redundant toString() calls
Closes gh-10467
This commit is contained in:
committed by
Stephane Nicoll
parent
c795688864
commit
f72c04286b
@@ -96,7 +96,7 @@ public class ValidationErrors implements Iterable<ObjectError> {
|
||||
private boolean isForError(ConfigurationPropertyName name,
|
||||
ConfigurationPropertyName boundPropertyName, FieldError error) {
|
||||
return name.isParentOf(boundPropertyName)
|
||||
&& boundPropertyName.getLastElement(Form.UNIFORM).toString()
|
||||
&& boundPropertyName.getLastElement(Form.UNIFORM)
|
||||
.equalsIgnoreCase(error.getField());
|
||||
}
|
||||
|
||||
|
||||
@@ -283,8 +283,8 @@ public final class ConfigurationPropertyName
|
||||
}
|
||||
if (indexed1 && indexed2) {
|
||||
try {
|
||||
long v1 = Long.parseLong(e1.toString());
|
||||
long v2 = Long.parseLong(e2.toString());
|
||||
long v1 = Long.parseLong(e1);
|
||||
long v2 = Long.parseLong(e2);
|
||||
return Long.compare(v1, v2);
|
||||
}
|
||||
catch (NumberFormatException ex) {
|
||||
|
||||
@@ -110,7 +110,7 @@ final class SystemEnvironmentPropertyMapper implements PropertyMapper {
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (int i = 0; i < numberOfElements; i++) {
|
||||
result.append(result.length() == 0 ? "" : "_");
|
||||
result.append(name.getElement(i, Form.UNIFORM).toString().toUpperCase());
|
||||
result.append(name.getElement(i, Form.UNIFORM).toUpperCase());
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user