aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/XmppConnection.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-11 19:48:02 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-11 19:48:02 +0200
commit690ee4988eda2c23830f514d31302b2837bd04f4 (patch)
treee6f2b145ea1a145503331cbce01a9113735cc9b0 /src/eu/siacs/conversations/xmpp/XmppConnection.java
parent2b14ad51ecbfccbed326b82f141d96fa2c5b268f (diff)
improved iterating over hashmap
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index b2829c6e..824750f1 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -926,14 +926,10 @@ public class XmppConnection implements Runnable {
public List<String> findDiscoItemsByFeature(String feature) {
List<String> items = new ArrayList<String>();
- Iterator<Entry<String, List<String>>> it = this.disco.entrySet()
- .iterator();
- while (it.hasNext()) {
- Entry<String, List<String>> pairs = it.next();
- if (pairs.getValue().contains(feature)) {
- items.add(pairs.getKey());
+ for (Entry<String, List<String>> cursor : disco.entrySet()) {
+ if (cursor.getValue().contains(feature)) {
+ items.add(cursor.getKey());
}
- it.remove();
}
return items;
}