OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d7c524
)
Avoid redundant Long allocation before unboxing
author
Tobias Thierer
<tobiast@google.com>
Thu, 21 Apr 2016 13:45:43 +0000
(14:45 +0100)
committer
Tobias Thierer
<tobiast@google.com>
Thu, 21 Apr 2016 13:45:59 +0000
(14:45 +0100)
long x = Long.valueOf(s) --> Long.parseLong()
Bug:
28289401
Change-Id: I0a6766d44a522b6dd5c7afc5e81ebe135103315e
test/099-vmdebug/src/Main.java
patch
|
blob
|
history
diff --git
a/test/099-vmdebug/src/Main.java
b/test/099-vmdebug/src/Main.java
index
1be5765
..
8068721
100644
(file)
--- 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;