Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1224

NullPointerExceptions not documented in some classes

    XMLWordPrintableJSON

    Details

      Description

      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

        Attachments

        1. Report6.java
          0.4 kB
          Cyrille Artho
        2. Report7.java
          0.2 kB
          Cyrille Artho

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Telcontar Cyrille Artho
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 40m
                40m
                Remaining:
                Remaining Estimate - 40m
                40m
                Logged:
                Time Spent - Not Specified
                Not Specified