Skip to content

Commit 484ff99

Browse files
committed
Update exception handling for Commons Imaging 1.0.0-alpha5
This alpha removes the ImageReadException and ImageWriteException classes.
1 parent 01a5a62 commit 484ff99

File tree

1 file changed

+0
-6
lines changed
  • commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image

1 file changed

+0
-6
lines changed

commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image/ImageData.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import org.apache.commons.imaging.Imaging;
3131
import org.apache.commons.imaging.ImageFormat;
3232
import org.apache.commons.imaging.ImageFormats;
33-
import org.apache.commons.imaging.ImageReadException;
34-
import org.apache.commons.imaging.ImageWriteException;
3533
import org.apache.commons.math4.legacy.ml.clustering.Clusterable;
3634
import org.apache.commons.math4.legacy.ml.clustering.Cluster;
3735

@@ -69,8 +67,6 @@ static ImageData load(String file) {
6967
return new ImageData(Imaging.getBufferedImage(new File(file)));
7068
} catch (IOException e) {
7169
throw new UncheckedIOException(e);
72-
} catch (ImageReadException e) {
73-
throw new RuntimeException(e);
7470
}
7571
}
7672

@@ -103,8 +99,6 @@ void write(List<? extends Cluster<PixelClusterable>> clusters,
10399
format);
104100
} catch (IOException e) {
105101
throw new UncheckedIOException(e);
106-
} catch (ImageWriteException e) {
107-
throw new RuntimeException(e);
108102
}
109103
}
110104

0 commit comments

Comments
 (0)