Improved test for catching EOF at reading the next-IFD pointer as EOF marker

This commit is contained in:
Oliver Schmidtmer 2016-02-16 23:05:44 +01:00
parent a709381825
commit d64eb40211

View File

@ -280,7 +280,9 @@ public class EXIFReaderTest extends MetadataReaderAbstractTest {
@Test
public void testReadExifWithMissingEOFMarker() throws IOException {
ImageInputStream stream = ImageIO.createImageInputStream(getResource("/exif/noeof.tif"));
createReader().read(stream);
CompoundDirectory directory = (CompoundDirectory) createReader().read(stream);
assertEquals(15, directory.size());
assertEquals(1, directory.directoryCount());
stream.close();
}
}