commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [40/53] [abbrv] [math] MATH-1340
Date Thu, 21 Apr 2016 23:15:26 GMT
MATH-1340

Avoid exception swallowing.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/96f2b16b
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/96f2b16b
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/96f2b16b

Branch: refs/heads/develop
Commit: 96f2b16b3efb93580e6aeaf1da97d9dffd5e260b
Parents: 7a8dc00
Author: Gilles <erans@apache.org>
Authored: Sat Mar 26 02:21:15 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Sat Mar 26 02:21:15 2016 +0100

----------------------------------------------------------------------
 src/test/java/org/apache/commons/math4/TestUtils.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/96f2b16b/src/test/java/org/apache/commons/math4/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/TestUtils.java b/src/test/java/org/apache/commons/math4/TestUtils.java
index 109e64d..c6f6c40 100644
--- a/src/test/java/org/apache/commons/math4/TestUtils.java
+++ b/src/test/java/org/apache/commons/math4/TestUtils.java
@@ -119,10 +119,8 @@ public class TestUtils {
             ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
             ObjectInputStream si = new ObjectInputStream(bis);
             return si.readObject();
-        } catch (IOException ioe) {
-            return null;
-        } catch (ClassNotFoundException cnfe) {
-            return null;
+        } catch (Exception e) {
+            throw new RuntimeException(e);
         }
     }
 


Mime
View raw message