Bug 1316012 - Remove unnecessary boxing/unboxing; r=sebastian
authorShan <11812r@gmail.com>
Sat, 26 Nov 2016 11:24:00 +0530
changeset 324650 b37f2a4bd333912ef621d3fb3f85d0df14473dd6
parent 324649 95c8f7a8569e36d7902c954d74e26a3851e4f29c
child 324651 dcdee53249e1afe2cc62b50dcdfe5a1f5f2dcd3d
push id31011
push userphilringnalda@gmail.com
push dateWed, 30 Nov 2016 03:16:20 +0000
treeherdermozilla-central@5d49c9792a34 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1316012
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1316012 - Remove unnecessary boxing/unboxing; r=sebastian MozReview-Commit-ID: 6k9d86ioK70
mobile/android/base/java/org/mozilla/gecko/push/Fetched.java
--- a/mobile/android/base/java/org/mozilla/gecko/push/Fetched.java
+++ b/mobile/android/base/java/org/mozilla/gecko/push/Fetched.java
@@ -28,17 +28,17 @@ public class Fetched {
 
     public static Fetched now(String value) {
         return new Fetched(value, System.currentTimeMillis());
     }
 
     public static @NonNull Fetched fromJSONObject(@NonNull JSONObject json) {
         final String value = json.optString("value", null);
         final String timestampString = json.optString("timestamp", null);
-        final long timestamp = timestampString != null ? Long.valueOf(timestampString) : 0L;
+        final long timestamp = timestampString != null ? Long.parseLong(timestampString) : 0L;
         return new Fetched(value, timestamp);
     }
 
     public JSONObject toJSONObject() throws JSONException {
         final JSONObject jsonObject = new JSONObject();
         if (value != null) {
             jsonObject.put("value", value);
         } else {