Bug 1316012 - Remove unnecessary boxing/unboxing; r=sebastian
authorShan <11812r@gmail.com>
Sat, 26 Nov 2016 11:24:00 +0530
changeset 324683 b37f2a4bd333912ef621d3fb3f85d0df14473dd6
parent 324682 95c8f7a8569e36d7902c954d74e26a3851e4f29c
child 324684 dcdee53249e1afe2cc62b50dcdfe5a1f5f2dcd3d
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerssebastian
bugs1316012
milestone53.0a1
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 {