diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-11 09:06:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-11 11:37:40 +0200 |
commit | 8032e4692b518a0189705f748267f08e3e412976 (patch) | |
tree | 23bae2197b8b15d8fce84f24971cb4f2b7418014 /qadevOOo | |
parent | 66e5317a91475ab5f7c796f023431d6a642fd60e (diff) |
cid#1492820 WMI: Inefficient Map Iterator
Change-Id: I2a220d5f8178dc96bb930600d51884c245128324
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123366
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_NumberingLevel.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java index 7c8ca73591a5..e3eace4209aa 100644 --- a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java +++ b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java @@ -20,6 +20,7 @@ package ifc.text; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import lib.StatusException; import lib.TestParameters; @@ -136,11 +137,9 @@ public class _NumberingLevel { // get rest of properties and check if they are optional if (! NumberingLevel.isEmpty()){ - for (Iterator<String> e = NumberingLevel.keySet().iterator() ; e.hasNext() ;) { - String property = e.next(); - + for (Map.Entry<String,Boolean> e : NumberingLevel.entrySet()) { // if some elements are not optional -> failed - if ( ! NumberingLevel.get(property).booleanValue() ){ + if (!e.getValue().booleanValue()) { if ( status ) { log.println("FAILED: com.sun.star.text.NumberingLevel -> " + @@ -148,7 +147,7 @@ public class _NumberingLevel { } status = false; - log.println("-> '" + property + "'"); + log.println("-> '" + e.getKey() + "'"); } } } |