javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 880b0b534cf5780dfe236def0847ded88da84019 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Jul 3 22:09:29 2019 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Jul 3 23:08:14 2019 +0200 cid#1448214: perf inefficient map iterator Change-Id: Ia145b46400acf2b7a35bedf689fc7fe74758a2f3 Reviewed-on: https://gerrit.libreoffice.org/75060 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java index a255721046e5..803c02e8340c 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java @@ -41,15 +41,14 @@ public class MultiTypeInterfaceContainer if ( (size=map.size()) > 0) { Type [] arTypes= new Type[size]; - Iterator<Object> it= map.keySet().iterator(); int countTypes= 0; - while (it.hasNext()) + for (Map.Entry<Object,InterfaceContainer> entry : map.entrySet()) { - Object key= it.next(); - InterfaceContainer cont= map.get(key); + InterfaceContainer cont= entry.getValue(); if (cont != null && cont.size() > 0) { + Object key = entry.getKey(); if (key == null) arTypes[countTypes++]= new Type(); else if (key instanceof Type) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits