From 476996fd155cb523e1c19bff9ba78724bb06fa66 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Fri, 14 Jun 2024 08:07:12 -0600 Subject: [PATCH] Fix issue with newer apache-commons Signed-off-by: Taylor Smock --- .../mapillary/io/export/MapillaryExportWriterThread.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java index f2fb9fa10..4236ee3e3 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapillary/io/export/MapillaryExportWriterThread.java @@ -20,8 +20,6 @@ import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; -import org.apache.commons.imaging.ImageReadException; -import org.apache.commons.imaging.ImageWriteException; import org.apache.commons.imaging.common.RationalNumber; import org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter; import org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpRewriter; @@ -118,7 +116,7 @@ public void run() { outputSet = new TiffOutputSet(); } exifDirectory = outputSet.getOrCreateExifDirectory(); - gpsDirectory = outputSet.getOrCreateGPSDirectory(); + gpsDirectory = outputSet.getOrCreateGpsDirectory(); gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF); gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF, @@ -139,7 +137,7 @@ public void run() { final String xml = getXmpXml(img, mimg); - outputSet.setGPSInDegrees(mimg.lon(), mimg.lat()); + outputSet.setGpsInDegrees(mimg.lon(), mimg.lat()); Path parentFile = file.getParent(); if (!Files.exists(parentFile) && !Files.isDirectory(parentFile)) { Files.createDirectories(parentFile); @@ -167,7 +165,7 @@ public void run() { } Thread.currentThread().interrupt(); return; - } catch (IOException | ImageReadException | ImageWriteException e) { + } catch (IOException e) { Logging.error(e); }