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 <er...@apache.org> Authored: Sat Mar 26 02:21:15 2016 +0100 Committer: Gilles <er...@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); } }