mirror of https://github.com/apache/lucene.git
change PositionCheckingMap to use an entry iterator in putAll rather than keyset - faster
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@804516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
90c8ef28c8
commit
395c65ad08
|
@ -433,11 +433,10 @@ public class WeightedSpanTermExtractor {
|
|||
static private class PositionCheckingMap extends HashMap {
|
||||
|
||||
public void putAll(Map m) {
|
||||
Iterator it = m.keySet().iterator();
|
||||
Iterator it = m.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Object key = it.next();
|
||||
Object val = m.get(key);
|
||||
this.put(key, val);
|
||||
Map.Entry entry = (java.util.Map.Entry) it.next();
|
||||
this.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue