[tor-commits] [metrics-web/master] Replace addAll with parameterized constructor call.
karsten at torproject.org
karsten at torproject.org
Mon Aug 27 12:35:18 UTC 2018
commit e57ed27ed3d5b043769699ee78cfca3453d4dca9
Author: Karsten Loesing <karsten.loesing at gmx.net>
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();
More information about the tor-commits
mailing list