Intellij suggested changes from static code analysis.

This commit is contained in:
Koen De Groote
2020-01-28 16:18:07 +01:00
parent b6773f6983
commit aff31ebd1b
8 changed files with 46 additions and 47 deletions
@@ -1144,10 +1144,11 @@ public final class TIFFImageMetadata extends AbstractMetadata {
throw new IIOInvalidTreeException("Expected \"TIFFIFD\" node", ifdNode);
}
List<Entry> entries = new ArrayList<>();
NodeList nodes = ifdNode.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
final int size = nodes.getLength();
List<Entry> entries = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
entries.add(toEntry(nodes.item(i)));
}