@Test public void testExifHandlerParseDateError() throws MetadataException { ExifIFD0Directory exif = Mockito.mock(ExifIFD0Directory.class); Mockito.when(exif.containsTag(ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL)).thenReturn(true); Mockito.when(exif.getDate(ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL)).thenReturn(null); Metadata metadata = new Metadata(); new ImageMetadataExtractor.ExifHandler().handle(exif, metadata); assertEquals("Parsing should proceed without date", null, metadata.get(TikaCoreProperties.CREATED)); }
protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException { handle(metadataExtractor.getDirectories().iterator()); }
ImageMetadataExtractor { protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException { handle(metadataExtractor.getDirectories().iterator()); } }
ImageMetadataExtractor { protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException { handle(metadataExtractor.getDirectories().iterator()); } ImageMetadataExtractor(Metadata metadata);  ImageMetadataExtractor(Metadata metadata, DirectoryHandler... handlers); }
ImageMetadataExtractor { protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException { handle(metadataExtractor.getDirectories().iterator()); } ImageMetadataExtractor(Metadata metadata);  ImageMetadataExtractor(Metadata metadata, DirectoryHandler... handlers); void parseJpeg(File file); void parseTiff(File file); void parseWebP(File file); void parseHeif(InputStream is); void parseRawExif(InputStream stream, int length, boolean needsExifHeader); void parseRawExif(byte[] exifData); void parseRawXMP(byte[] xmpData); }
ImageMetadataExtractor { protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException { handle(metadataExtractor.getDirectories().iterator()); } ImageMetadataExtractor(Metadata metadata);  ImageMetadataExtractor(Metadata metadata, DirectoryHandler... handlers); void parseJpeg(File file); void parseTiff(File file); void parseWebP(File file); void parseHeif(InputStream is); void parseRawExif(InputStream stream, int length, boolean needsExifHeader); void parseRawExif(byte[] exifData); void parseRawXMP(byte[] xmpData);  }