[Libreoffice-commits] core.git: javaunohelper/com
rbuj
robert.buj at gmail.com
Sun Aug 10 00:30:41 PDT 2014
javaunohelper/com/sun/star/comp/helper/ComponentContext.java | 12 +++--------
1 file changed, 4 insertions(+), 8 deletions(-)
New commits:
commit c77e929c4bfa6e9aee3d6103ef3629a9bcf583ae
Author: rbuj <robert.buj at gmail.com>
Date: Sat Aug 9 21:15:11 2014 +0200
javaunohelper: Iterate over each Entry in a Map & Enhanced for-loops
Change-Id: I7abd62e0717bfc9c9b36a431092ddd92ef72684a
Reviewed-on: https://gerrit.libreoffice.org/10852
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
index 30ff8ea..6f2d46a 100644
--- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
+++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java
@@ -29,7 +29,6 @@ import com.sun.star.lang.XEventListener;
import com.sun.star.lang.EventObject;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.ArrayList;
@@ -230,23 +229,20 @@ public class ComponentContext implements XComponentContext, XComponent
// fire events
EventObject evt = new EventObject( this );
- Iterator<XEventListener> eventListener = m_eventListener.iterator();
- while (eventListener.hasNext())
+ for (XEventListener listener : m_eventListener)
{
- XEventListener listener = eventListener.next();
listener.disposing( evt );
}
m_eventListener.clear();
XComponent tdmgr = null;
// dispose values, then service manager, then typdescription manager
- Iterator<String> keys = m_table.keySet().iterator();
- while (keys.hasNext())
+ for (java.util.Map.Entry<String, Object> entry : m_table.entrySet())
{
- String name = keys.next();
+ String name = entry.getKey();
if (! name.equals( SMGR_NAME ))
{
- Object o = m_table.get( name );
+ Object o = entry.getValue();
if (o instanceof ComponentContextEntry)
{
o = ((ComponentContextEntry)o).m_value;
More information about the Libreoffice-commits
mailing list