]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fixed-locale String.format
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 11:59:25 +0000 (11:59 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 12:48:13 +0000 (12:48 +0000)
these are debugging statements, but still

app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java
app/src/main/java/net/ktnx/mobileledger/ui/HueRing.java

index f2ed99ff9e09d4170b538a2409341914eafab0cf..e3675b177ba738950b27234ee98f2a0e5297375e 100644 (file)
@@ -137,8 +137,8 @@ public class SendTransactionTask extends AsyncTask<LedgerTransaction, Void, Void
             req.write(bodyBytes);
 
             final int responseCode = http.getResponseCode();
-            debug("network",
-                    String.format("Response: %d %s", responseCode, http.getResponseMessage()));
+            debug("network", String.format(Locale.US, "Response: %d %s", responseCode,
+                    http.getResponseMessage()));
 
             try (InputStream resp = http.getErrorStream()) {
 
index 006cd4ba7c0480031cbeaa30dc1becae8b11552d..a896a24a09374944b94fb31a8de616f5bc35b0db 100644 (file)
@@ -230,9 +230,9 @@ public class HueRing extends View {
                 float hue = (float) (angleRad / (2 * Math.PI));
                 if (hue < 0)
                     hue += 1;
-                debug("TMP",
-                        String.format("x=%1.3f, y=%1.3f, angle=%1.3frad, hueDegrees=%1.3f", x, y,
-                                angleRad, hue));
+                debug("TMP", String.format(Locale.US,
+                        "x=%1.3f, y=%1.3f, angle=%1.3f rad, hueDegrees=%1.3f", x, y, angleRad,
+                        hue));
                 setHue(hue);
                 break;
         }