Continue reading the metadata if invalid tags were found

This commit is contained in:
Oliver Schmidtmer
2016-02-02 23:52:03 +01:00
parent a9428a1ecf
commit 672aa1a048
3 changed files with 35 additions and 33 deletions
@@ -276,4 +276,12 @@ public class EXIFReaderTest extends MetadataReaderAbstractTest {
assertNotNull(interop);
assertEquals(0, interop.size());
}
@Test
public void testReadExifWithEmptyTag() throws IOException {
ImageInputStream stream = ImageIO.createImageInputStream(getResource("/exif/emptyexiftag.tif"));
CompoundDirectory directory = (CompoundDirectory) createReader().read(stream);
assertEquals(3, directory.directoryCount());
stream.close();
}
}