mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-10-04 11:26:44 -04:00
Improved test for catching EOF at reading the next-IFD pointer as EOF marker
This commit is contained in:
@@ -280,7 +280,9 @@ public class EXIFReaderTest extends MetadataReaderAbstractTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testReadExifWithMissingEOFMarker() throws IOException {
|
public void testReadExifWithMissingEOFMarker() throws IOException {
|
||||||
ImageInputStream stream = ImageIO.createImageInputStream(getResource("/exif/noeof.tif"));
|
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();
|
stream.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user