diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/service/FileSystemStorageService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/juick/service/FileSystemStorageService.java b/src/main/java/com/juick/service/FileSystemStorageService.java index c3ec9333..57032492 100644 --- a/src/main/java/com/juick/service/FileSystemStorageService.java +++ b/src/main/java/com/juick/service/FileSystemStorageService.java @@ -36,7 +36,6 @@ import com.juick.model.Message; import com.juick.model.Photo; import com.juick.model.User; -import org.apache.commons.imaging.ImageReadException; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.common.ImageMetadata; import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata; @@ -146,7 +145,7 @@ public class FileSystemStorageService implements StorageService { ImageMetadata metadata = Imaging.getMetadata(imageFile); if (metadata instanceof JpegImageMetadata jpegMetadata) { - TiffField orientationField = jpegMetadata.findEXIFValue(TiffTagConstants.TIFF_TAG_ORIENTATION); + TiffField orientationField = jpegMetadata.findExifValue(TiffTagConstants.TIFF_TAG_ORIENTATION); if (orientationField != null) { int orientation = orientationField.getIntValue(); @@ -179,7 +178,7 @@ public class FileSystemStorageService implements StorageService { } } } - } catch (ImageReadException | IOException e) { + } catch (IOException e) { // failed to read metadata. // nothing to do here, return image as is. } |