[
https://issues.apache.org/jira/browse/MATH-1340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15212696#comment-15212696
]
Gilles commented on MATH-1340:
------------------------------
Fix available in branch "feature-MATH-1340".
> "serializeAndRecover" testing utility swallows exceptions
> ---------------------------------------------------------
>
> Key: MATH-1340
> URL: https://issues.apache.org/jira/browse/MATH-1340
> Project: Commons Math
> Issue Type: Improvement
> Reporter: Gilles
> Assignee: Gilles
> Priority: Trivial
> Labels: debugging
> Fix For: 4.0
>
>
> Class {{TestUtils}} (in the "test" part of the repository) contains a
> "serializeAndRecover" method that catches "IOException" and
> "ClassNotFoundException" and just returns "null".
> When testing code changes, some unit tests can thus throw
> "NullPointerException". Even if the returned value is checked for "null",
> there is no trace as to what caused it (the original stack trace is lost).
> I propose to wrap the exception in a "RuntimeException" and rethrow it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)