Remove redundant toString() calls

Closes gh-10467
This commit is contained in:
dreis2211
2017-10-01 17:48:48 +02:00
committed by Stephane Nicoll
parent c795688864
commit f72c04286b
3 changed files with 4 additions and 4 deletions

View File

@@ -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());
}

View File

@@ -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) {

View File

@@ -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();
}