Use valueOf factory method instead of constructor

This commit is contained in:
Federico Bond
2014-09-14 21:02:29 -03:00
parent c2c1f1a216
commit 69b5953203
2 changed files with 5 additions and 5 deletions

View File

@@ -1492,7 +1492,7 @@ public class JSONObject {
return d;
}
} else {
Long myLong = new Long(string);
Long myLong = Long.valueOf(string);
if (myLong.longValue() == myLong.intValue()) {
return Integer.valueOf(myLong.intValue());
} else {