summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-07-03 21:46:42 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-07-03 22:54:07 +0200
commit04fbd174cb787ea15fb74abeca37589ab74df6ab (patch)
tree073f6a707f3412162cd618a514723d425648f5c3 /scripting
parenta1e9acb08211acc623a99cd9489efe569d8b6059 (diff)
cid#1448470: perf inefficient map iterator
Change-Id: If7dd6455ca02d6c78ac997bd9c2924863db1d906 Reviewed-on: https://gerrit.libreoffice.org/75059 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
index a8b12e071284..eeb8f9ef2cfc 100644
--- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
+++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
@@ -338,13 +338,10 @@ public class ParcelDescriptor {
String key;
item = document.createElement("languagedepprops");
- Iterator<String> iter = languagedepprops.keySet().iterator();
-
- while (iter.hasNext()) {
+ for (Map.Entry<String, String> entry : languagedepprops.entrySet()) {
tempitem = document.createElement("prop");
- key = iter.next();
- tempitem.setAttribute("name", key);
- tempitem.setAttribute("value", languagedepprops.get(key));
+ tempitem.setAttribute("name", entry.getKey());
+ tempitem.setAttribute("value", entry.getValue());
item.appendChild(tempitem);
}