diff options
author | rbuj <robert.buj@gmail.com> | 2014-08-09 15:51:20 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-09 15:23:48 +0000 |
commit | c6de012a66deebbaefa01cffdc6ed7961b3ed57e (patch) | |
tree | 5a27741354d304be875d982e9f18eed6667c973e /javaunohelper/com | |
parent | 0b684fa3e919dea3a482f85580c1266b81598f70 (diff) |
javaunohelper: Iterate over each Entry in a Map
Change-Id: I12a3348c297ddddcfd2902c1cbb04bd0ce35b15e
Reviewed-on: https://gerrit.libreoffice.org/10846
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'javaunohelper/com')
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/Bootstrap.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java index 3bc5bdea0212..c11a415b386b 100644 --- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java +++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java @@ -38,7 +38,6 @@ import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; -import java.util.Iterator; import java.util.Hashtable; import java.util.Random; @@ -187,13 +186,10 @@ public class Bootstrap { if (null != bootstrap_parameters) { pairs = new String [ 2 * bootstrap_parameters.size() ]; - Iterator<String> keys = bootstrap_parameters.keySet().iterator(); int n = 0; - while (keys.hasNext()) - { - String name = keys.next(); - pairs[ n++ ] = name; - pairs[ n++ ] = bootstrap_parameters.get( name ); + for (java.util.Map.Entry<String, String> bootstrap_parameter : bootstrap_parameters.entrySet()) { + pairs[ n++ ] = bootstrap_parameter.getKey(); + pairs[ n++ ] = bootstrap_parameter.getValue(); } } |