summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tobias Thierer <tobiast@google.com> 2016-04-21 14:45:43 +0100
committer Tobias Thierer <tobiast@google.com> 2016-04-21 14:45:59 +0100
commitdbeb6eee5e54c420e64d87a39b2533231fb41c47 (patch)
tree8dec7b43746439709ab557599a7519d99ffce529
parent9d7c524c9bd603b1df9e88132f7ea4d59dab44a3 (diff)
Avoid redundant Long allocation before unboxing
long x = Long.valueOf(s) --> Long.parseLong() Bug: 28289401 Change-Id: I0a6766d44a522b6dd5c7afc5e81ebe135103315e
-rw-r--r--test/099-vmdebug/src/Main.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/099-vmdebug/src/Main.java b/test/099-vmdebug/src/Main.java
index 1be5765155..8068721219 100644
--- a/test/099-vmdebug/src/Main.java
+++ b/test/099-vmdebug/src/Main.java
@@ -133,7 +133,7 @@ public class Main {
System.out.println("Got null string");
return;
}
- long n = Long.valueOf(s);
+ long n = Long.parseLong(s);
if (n < 0) {
System.out.println("Got negative number " + n);
}
@@ -157,8 +157,8 @@ public class Main {
System.out.println("Got bad bucket " + bucket);
continue;
}
- long key = Long.valueOf(kv[0]);
- long value = Long.valueOf(kv[1]);
+ long key = Long.parseLong(kv[0]);
+ long value = Long.parseLong(kv[1]);
if (key < 0 || value < 0) {
System.out.println("Got negative key or value " + bucket);
continue;