diff options
Diffstat (limited to 'java/text/AttributedStringIterator.java')
-rw-r--r-- | java/text/AttributedStringIterator.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/java/text/AttributedStringIterator.java b/java/text/AttributedStringIterator.java index 22111c714..9e74f42aa 100644 --- a/java/text/AttributedStringIterator.java +++ b/java/text/AttributedStringIterator.java @@ -209,12 +209,16 @@ getRunLimit(Set attribute_set) Map attribute_map = getAttributes(); + boolean found = false; Iterator iter = attribute_set.iterator(); - while(iter.hasNext()) + while(iter.hasNext()) if (!attribute_map.containsKey(iter.next())) - break; + { + found = true; + break; + } - if (iter.hasNext()) + if (found) break; } while (ci.next() != CharacterIterator.DONE); @@ -225,8 +229,8 @@ getRunLimit(Set attribute_set) if (run_limit == orig_index) return(-1); // No characters match the given attributes - else if (!hit_end) - --run_limit; +// else if (!hit_end) +// --run_limit; return(run_limit); } |