[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-lib/master] Simplify method call.
commit 5af3f60993a5ccf68545ca83a485e966a66343a9
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed Nov 20 12:07:49 2019 +0100
Simplify method call.
---
src/main/java/org/torproject/descriptor/impl/KeyValueMap.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java b/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
index 08ad84e..6cb4680 100644
--- a/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
+++ b/src/main/java/org/torproject/descriptor/impl/KeyValueMap.java
@@ -20,7 +20,7 @@ public class KeyValueMap<T> extends TreeMap<String, T> {
private void putPair(String key, T value, String line, String listElement,
int keyLength) throws DescriptorParseException {
- if (this.keySet().contains(key)) {
+ if (this.containsKey(key)) {
throw new DescriptorParseException("Line '" + line + "' contains "
+ "duplicate key '" + key + "'.");
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits