commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cyrille Artho (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MATH-1224) NullPointerExceptions not documented in some classes
Date Mon, 11 May 2015 00:44:59 GMT

     [ https://issues.apache.org/jira/browse/MATH-1224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Cyrille Artho updated MATH-1224:
--------------------------------
    Attachment: Report6.java

Self-contained unit test to reproduce NullPointerException on HighamHall54Integrator (the
need to initialize it further is not documented yet).

> NullPointerExceptions not documented in some classes
> ----------------------------------------------------
>
>                 Key: MATH-1224
>                 URL: https://issues.apache.org/jira/browse/MATH-1224
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3, 3.5
>         Environment: Mac OS X, Java 6-8
>            Reporter: Cyrille Artho
>            Priority: Minor
>              Labels: documentation, easyfix, easytest, newbie
>         Attachments: Report6.java, Report7.java
>
>   Original Estimate: 40m
>  Remaining Estimate: 40m
>
> In general, the need to initialize newly constructed objects with more data is now documented,
but we have found two cases where a NullPointerException is thrown because of missing data.
> The documentation should be updated to reflect this. This is similar to issues report
in MATH-1116 but concerns classes that are not going to be deprecated (as far as we can tell).
> I have previously posted this as a new comment on issue 1116, but that comment has not
elicited any response. As the original issue is one year old, I post this bug as a new issue.
> Below is the code that produces the two cases:
> org.apache.commons.math3.ode.nonstiff.HighamHall54Integrator var1 = new org.apache.commons.math3.ode.nonstiff.HighamHall54Integrator(0.0d,
0.0d, 0.0d, 0.0d);
> double[] var2 = new double[] { 0.0d };
> var1.computeDerivatives(0.0d, var2, var2); // NPE
> new org.apache.commons.math3.stat.correlation.SpearmansCorrelation().getCorrelationMatrix();
// NPE



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message