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

[tor-commits] [metrics-web/release] Use 'StringBuilder#append' consistently.



commit 03fc04edbd31490dcb1c31499c6ddce12a214328
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
Date:   Sat Mar 24 09:31:07 2018 +0000

    Use 'StringBuilder#append' consistently.
---
 .../java/org/torproject/metrics/web/RObjectGenerator.java  | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/web/RObjectGenerator.java b/src/main/java/org/torproject/metrics/web/RObjectGenerator.java
index 5d9b29c..04bda0c 100644
--- a/src/main/java/org/torproject/metrics/web/RObjectGenerator.java
+++ b/src/main/java/org/torproject/metrics/web/RObjectGenerator.java
@@ -188,18 +188,18 @@ public class RObjectGenerator implements ServletContextListener {
       String parameterName = parameter.getKey();
       String[] parameterValues = parameter.getValue();
       for (String param : parameterValues) {
-        tableFilenameBuilder.append("-" + param);
+        tableFilenameBuilder.append("-").append(param);
       }
       if (parameterValues.length < 2) {
-        queryBuilder.append(parameterName + " = '"
-            + parameterValues[0] + "', ");
+        queryBuilder.append(parameterName).append(" = '")
+            .append(parameterValues[0]).append("', ");
       } else {
-        queryBuilder.append(parameterName + " = c(");
+        queryBuilder.append(parameterName).append(" = c(");
         for (int i = 0; i < parameterValues.length - 1; i++) {
-          queryBuilder.append("'" + parameterValues[i] + "', ");
+          queryBuilder.append("'").append(parameterValues[i]).append("', ");
         }
-        queryBuilder.append("'" + parameterValues[
-            parameterValues.length - 1] + "'), ");
+        queryBuilder.append("'").append(parameterValues[
+            parameterValues.length - 1]).append("'), ");
       }
     }
     tableFilenameBuilder.append(".tbl");



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