diff options
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java index 803c02e8340c..9b061f81c217 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java @@ -80,10 +80,9 @@ public class MultiTypeInterfaceContainer synchronized public InterfaceContainer getContainer(Object key) { InterfaceContainer retVal= null; - Iterator<Object> it= map.keySet().iterator(); - while (it.hasNext()) + for (Map.Entry<Object,InterfaceContainer> entry : map.entrySet()) { - Object obj= it.next(); + Object obj= entry.getKey(); if (obj == null && key == null) { retVal= map.get(null); @@ -91,7 +90,7 @@ public class MultiTypeInterfaceContainer } else if( obj != null && obj.equals(key)) { - retVal= map.get(obj); + retVal= entry.getValue(); break; } } |