[tor-commits] [metrics-db/master] Close a few readers/streams, spotted by Eclipse.
karsten at torproject.org
karsten at torproject.org
Wed Jul 25 07:00:10 UTC 2012
commit 7d2ec97550c468b20d8c653af72509ed7bfee206
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed Jul 25 08:58:29 2012 +0200
Close a few readers/streams, spotted by Eclipse.
---
src/org/torproject/ernie/db/ArchiveWriter.java | 1 +
.../torproject/ernie/db/BridgeSnapshotReader.java | 1 +
.../ernie/db/SanitizedBridgesWriter.java | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/org/torproject/ernie/db/ArchiveWriter.java b/src/org/torproject/ernie/db/ArchiveWriter.java
index 1d37edc..d1b9499 100644
--- a/src/org/torproject/ernie/db/ArchiveWriter.java
+++ b/src/org/torproject/ernie/db/ArchiveWriter.java
@@ -317,6 +317,7 @@ public class ArchiveWriter {
}
}
}
+ br.close();
sb.append(String.format("%nC, %s, %d/%d (%.1f%%), "
+ "%d/%d (%.1f%%), %d/%d (%.1f%%)",
validAfterTime, foundVotes, allVotes,
diff --git a/src/org/torproject/ernie/db/BridgeSnapshotReader.java b/src/org/torproject/ernie/db/BridgeSnapshotReader.java
index 0de9d83..f21794d 100644
--- a/src/org/torproject/ernie/db/BridgeSnapshotReader.java
+++ b/src/org/torproject/ernie/db/BridgeSnapshotReader.java
@@ -174,6 +174,7 @@ public class BridgeSnapshotReader {
descriptorImportHistory.add(fileDigest);
parsedFiles++;
}
+ bis.close();
}
in.close();
diff --git a/src/org/torproject/ernie/db/SanitizedBridgesWriter.java b/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
index 366da00..4f72c6a 100644
--- a/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
+++ b/src/org/torproject/ernie/db/SanitizedBridgesWriter.java
@@ -109,6 +109,7 @@ public class SanitizedBridgesWriter {
byte[] secret = Hex.decodeHex(parts[1].toCharArray());
this.secretsForHashingIPAddresses.put(month, secret);
}
+ br.close();
if (!this.persistenceProblemWithSecrets) {
this.logger.fine("Read "
+ this.secretsForHashingIPAddresses.size() + " secrets for "
More information about the tor-commits
mailing list