Avoid use of primitive wrapper constructors

Deprecated in Java 9.
This commit is contained in:
Andrew Gaul 2016-05-09 22:47:27 -07:00
parent 62410d31ae
commit e423bc949e
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public class DatapointHandler extends ParseSax.HandlerForGeneratedRequestWithRes
private Double doubleOrNull() {
String string = currentText.toString().trim();
if (!string.equals("")) {
return new Double(string);
return Double.valueOf(string);
}
return null;
}

View File

@ -159,7 +159,7 @@ public class ElasticStackComputeServiceAdapter implements
@Override
public boolean apply(Image input) {
String toParse = input.getUserMetadata().get("size");
return toParse != null && new Float(toParse) <= size;
return toParse != null && Float.parseFloat(toParse) <= size;
}
@Override