[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [exonerator/master] Use chained String.append calls.



commit 2cd8b3f32925104c27542bc9e00cee6d95b6804e
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 15:46:31 2018 +0200

    Use chained String.append calls.
---
 .../org/torproject/metrics/exonerator/ExoneraTorDatabaseImporter.java   | 2 +-
 src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorDatabaseImporter.java b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorDatabaseImporter.java
index 065b986..ab4f094 100644
--- a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorDatabaseImporter.java
+++ b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorDatabaseImporter.java
@@ -145,7 +145,7 @@ public class ExoneraTorDatabaseImporter {
       }
       BufferedWriter bw = new BufferedWriter(new FileWriter(
           "exonerator-lock"));
-      bw.append(String.valueOf(System.currentTimeMillis()) + "\n");
+      bw.append(String.valueOf(System.currentTimeMillis())).append("\n");
       bw.close();
     } catch (IOException e) {
       logger.warn("Could not create 'exonerator-lock' file.  Exiting.");
diff --git a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java
index 4a99e19..8786261 100644
--- a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java
+++ b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java
@@ -110,7 +110,7 @@ public class ExoneraTorServlet extends HttpServlet {
               StringBuilder sb = new StringBuilder();
               int writtenAddresses = 0;
               for (String address : match.addresses) {
-                sb.append((writtenAddresses++ > 0 ? ", " : "") + address);
+                sb.append(writtenAddresses++ > 0 ? ", " : "").append(address);
               }
               String[] statusEntry = new String[]{match.timestamp,
                   sb.toString(), match.fingerprint, match.nickname,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits