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

[tor-commits] [metrics-web/master] Replace addAll with parameterized constructor call.



commit e57ed27ed3d5b043769699ee78cfca3453d4dca9
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 20 16:26:07 2018 +0200

    Replace addAll with parameterized constructor call.
---
 .../torproject/metrics/stats/servers/ConsensusStatsFileHandler.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/stats/servers/ConsensusStatsFileHandler.java b/src/main/java/org/torproject/metrics/stats/servers/ConsensusStatsFileHandler.java
index c736496..c1c1e8b 100644
--- a/src/main/java/org/torproject/metrics/stats/servers/ConsensusStatsFileHandler.java
+++ b/src/main/java/org/torproject/metrics/stats/servers/ConsensusStatsFileHandler.java
@@ -321,9 +321,8 @@ public class ConsensusStatsFileHandler {
     /* Add average number of bridges per day to the database. */
     if (connectionUrl != null) {
       try {
-        Map<String, String> insertRows = new HashMap<>();
         Map<String, String> updateRows = new HashMap<>();
-        insertRows.putAll(this.bridgesPerDay);
+        Map<String, String> insertRows = new HashMap<>(this.bridgesPerDay);
         Connection conn = DriverManager.getConnection(connectionUrl);
         conn.setAutoCommit(false);
         Statement statement = conn.createStatement();



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