diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 73fc41254..a4a06972b 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -73,6 +73,10 @@ Users are encouraged to upgrade to this version as this release not 2. A few methods in the FastMath class are in fact slower that their counterpart in either Math or StrictMath (cf. MATH-740 and MATH-901). "> + + Fixed potential null pointer dereferencing in constructor of + "DummyStepInterpolator(DummyStepInterpolator)". + Fixed BinomialDistribution to deal with degenerate cases correctly. diff --git a/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java b/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java index 9d9671e79..97b67b40d 100644 --- a/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java +++ b/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java @@ -80,7 +80,9 @@ public class DummyStepInterpolator */ public DummyStepInterpolator(final DummyStepInterpolator interpolator) { super(interpolator); - currentDerivative = interpolator.currentDerivative.clone(); + if (interpolator.currentDerivative != null) { + currentDerivative = interpolator.currentDerivative.clone(); + } } /** Really copy the finalized instance.