Bug 1321799 - Use decimal format placeholder for filesize r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Fri, 02 Dec 2016 21:57:33 -0800
changeset 325310 ff3a2aebe47d050ba5bbef5cf2cc9848c49dc821
parent 325309 f0b84f67b2a9780629b5c9fa8ee0dcf5a2cf89f3
child 325311 373caf284bbc8e8d9cff6638b11006d55b3cc1c0
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerssebastian
bugs1321799
milestone53.0a1
Bug 1321799 - Use decimal format placeholder for filesize r=sebastian %l seems to be for hour in 12hr clock (i.e. 1-12), but we're applying it to a filesize. %d seems more appropriate in order to display the actual raw filesize. MozReview-Commit-ID: AKTpYndm81o
mobile/android/base/java/org/mozilla/gecko/telemetry/stores/TelemetryJSONFilePingStore.java
--- a/mobile/android/base/java/org/mozilla/gecko/telemetry/stores/TelemetryJSONFilePingStore.java
+++ b/mobile/android/base/java/org/mozilla/gecko/telemetry/stores/TelemetryJSONFilePingStore.java
@@ -191,17 +191,17 @@ public class TelemetryJSONFilePingStore 
             return null;
         }
 
         final FileInputStream inputStream;
         try {
             inputStream = new FileInputStream(file);
         } catch (final FileNotFoundException e) {
             // permission problem might also cause same exception. To get more debug information.
-            String fileInfo = String.format("existence: %b, can write: %b, size: %l.",
+            String fileInfo = String.format("existence: %b, can write: %b, size: %d.",
                     file.exists(), file.canWrite(), file.length());
             String msg = String.format(
                     "Expected file to exist but got exception in thread: %s. File info - %s",
                     Thread.currentThread().getName(), fileInfo);
             throw new IllegalStateException(msg);
         }
 
         final JSONObject obj;