You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2014/09/13 17:36:44 UTC

svn commit: r1624752 - in /commons/proper/math/trunk/src: changes/changes.xml test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java

Author: tn
Date: Sat Sep 13 15:36:43 2014
New Revision: 1624752

URL: http://svn.apache.org/r1624752
Log:
[MATH-1149] Fix potential null pointer dereferencing.

Modified:
    commons/proper/math/trunk/src/changes/changes.xml
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java

Modified: commons/proper/math/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1624752&r1=1624751&r2=1624752&view=diff
==============================================================================
--- commons/proper/math/trunk/src/changes/changes.xml (original)
+++ commons/proper/math/trunk/src/changes/changes.xml Sat Sep 13 15:36:43 2014
@@ -73,6 +73,10 @@ Users are encouraged to upgrade to this 
   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).
 ">
+      <action dev="tn" type="fix" issue="MATH-1149" due-to="M Kim">
+        Fixed potential null pointer dereferencing in constructor of
+        "DummyStepInterpolator(DummyStepInterpolator)".
+      </action>
       <action dev="psteitz" type="fix" issue="MATH-1136" due-to="Aleksei Dievskii">
         Fixed BinomialDistribution to deal with degenerate cases correctly.
       </action>

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java?rev=1624752&r1=1624751&r2=1624752&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java Sat Sep 13 15:36:43 2014
@@ -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.