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
--- 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;