From 934859aaa88131316c1b471ec435c4f912050f3c Mon Sep 17 00:00:00 2001 From: dependabot[bot] Date: Mon, 8 Apr 2024 21:04:58 +0000 Subject: build(deps): bump org.apache.commons:commons-imaging Bumps org.apache.commons:commons-imaging from 1.0-alpha3 to 1.0.0-alpha4. --- updated-dependencies: - dependency-name: org.apache.commons:commons-imaging dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- src/main/java/com/juick/service/FileSystemStorageService.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 8545654c..4b659a77 100644 --- a/pom.xml +++ b/pom.xml @@ -166,7 +166,7 @@ org.apache.commons commons-imaging - 1.0-alpha3 + 1.0.0-alpha4 commons-io 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. } -- cgit v1.2.3