Use for-each loop

This commit is contained in:
Gary Gregory 2022-07-09 08:53:12 -04:00
parent 1c9673a218
commit 3ac6beab45
1 changed files with 2 additions and 3 deletions

View File

@ -21,7 +21,6 @@ import java.text.MessageFormat;
import java.text.ParsePosition;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
@ -208,11 +207,11 @@ public class ExtendedMessageFormat extends MessageFormat {
// only loop over what we know we have, as MessageFormat on Java 1.3
// seems to provide an extra format element:
int i = 0;
for (final Iterator<Format> it = foundFormats.iterator(); it.hasNext(); i++) {
final Format f = it.next();
for (final Format f : foundFormats) {
if (f != null) {
origFormats[i] = f;
}
i++;
}
super.setFormats(origFormats);
}