summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@verizonmedia.com>2019-07-30 09:27:01 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2019-07-30 09:28:57 +0200
commitbf01971a443bca4ef2c255ba266722f7466685a1 (patch)
treee343d8466cc5bcba17e9ee8f4bf8a1a16c12609f /node-admin
parente02e35f6dea6b31af7e8726c9d898ca7602c370d (diff)
Avoid unnecessary boxing
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java2
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/StoredInteger.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
index 167ca15bdbf..f4355ed3afa 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/StorageMaintainer.java
@@ -86,7 +86,7 @@ public class StorageMaintainer {
throw new RuntimeException("Result from disk usage command not as expected: " + output);
}
- return 1024 * Long.valueOf(results[0]);
+ return 1024 * Long.parseLong(results[0]);
}
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/StoredInteger.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/StoredInteger.java
index a815515ac83..9151dde19a6 100644
--- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/StoredInteger.java
+++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/task/util/file/StoredInteger.java
@@ -34,7 +34,7 @@ public class StoredInteger implements Supplier<OptionalInt> {
if (!hasBeenRead) {
try {
String value = new String(Files.readAllBytes(path));
- this.value = OptionalInt.of(Integer.valueOf(value));
+ this.value = OptionalInt.of(Integer.parseInt(value));
} catch (NoSuchFileException e) {
this.value = OptionalInt.empty();
} catch (IOException e) {