aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/com/juick/service/FileSystemStorageService.java5
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 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
- <version>1.0-alpha3</version>
+ <version>1.0.0-alpha4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
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.
}