commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1624752 - in /commons/proper/math/trunk/src: changes/changes.xml test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java
Date Sat, 13 Sep 2014 15:36:44 GMT
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.



Mime
View raw message