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-numbers.git

commit e109a4b4696249163a6aecfe0976875a8ee7402e
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Tue Mar 25 15:07:22 2025 +0000

    Sonar fix: reuse catch block
---
 .../src/test/java/org/apache/commons/numbers/core/TestUtils.java      | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/commons-numbers-core/src/test/java/org/apache/commons/numbers/core/TestUtils.java
 
b/commons-numbers-core/src/test/java/org/apache/commons/numbers/core/TestUtils.java
index f34d8d79..f936a9c8 100644
--- 
a/commons-numbers-core/src/test/java/org/apache/commons/numbers/core/TestUtils.java
+++ 
b/commons-numbers-core/src/test/java/org/apache/commons/numbers/core/TestUtils.java
@@ -70,9 +70,7 @@ public final class TestUtils {
             final ByteArrayInputStream bis = new 
ByteArrayInputStream(bos.toByteArray());
             final ObjectInputStream si = new ObjectInputStream(bis);
             return si.readObject();
-        } catch (final IOException ioe) {
-            return null;
-        } catch (final ClassNotFoundException cnfe) {
+        } catch (final IOException | ClassNotFoundException e) {
             return null;
         }
     }

Reply via email to