This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git


The following commit(s) were added to refs/heads/master by this push:
     new 484ff99a6 Update exception handling for Commons Imaging 1.0.0-alpha5
484ff99a6 is described below

commit 484ff99a6ec5d42c34f55f4fab81234a1e2766a7
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Wed Mar 5 15:52:57 2025 +0000

    Update exception handling for Commons Imaging 1.0.0-alpha5
    
    This alpha removes the ImageReadException and ImageWriteException
    classes.
---
 .../org/apache/commons/math4/examples/kmeans/image/ImageData.java   | 6 ------
 1 file changed, 6 deletions(-)

diff --git 
a/commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image/ImageData.java
 
b/commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image/ImageData.java
index 44b98ecfa..f258c320a 100644
--- 
a/commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image/ImageData.java
+++ 
b/commons-math-examples/examples-kmeans/image/src/main/java/org/apache/commons/math4/examples/kmeans/image/ImageData.java
@@ -30,8 +30,6 @@ import java.awt.image.WritableRaster;
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.ImageFormat;
 import org.apache.commons.imaging.ImageFormats;
-import org.apache.commons.imaging.ImageReadException;
-import org.apache.commons.imaging.ImageWriteException;
 import org.apache.commons.math4.legacy.ml.clustering.Clusterable;
 import org.apache.commons.math4.legacy.ml.clustering.Cluster;
 
@@ -69,8 +67,6 @@ final class ImageData {
             return new ImageData(Imaging.getBufferedImage(new File(file)));
         } catch (IOException e) {
             throw new UncheckedIOException(e);
-        } catch (ImageReadException e) {
-            throw new RuntimeException(e);
         }
     }
 
@@ -103,8 +99,6 @@ final class ImageData {
                                format);
         } catch (IOException e) {
             throw new UncheckedIOException(e);
-        } catch (ImageWriteException e) {
-            throw new RuntimeException(e);
         }
     }
 

Reply via email to