commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r582682 - in /commons/proper/math/trunk/src/java/org/apache/commons/math/ode: DummyStepHandler.java DummyStepInterpolator.java
Date Sun, 07 Oct 2007 21:19:15 GMT
Author: luc
Date: Sun Oct  7 14:19:14 2007
New Revision: 582682

URL: http://svn.apache.org/viewvc?rev=582682&view=rev
Log:
fixed a serialization-related array update error in DummyStepInterpolator

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepHandler.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepInterpolator.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepHandler.java?rev=582682&r1=582681&r2=582682&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepHandler.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepHandler.java Sun
Oct  7 14:19:14 2007
@@ -17,6 +17,8 @@
 
 package org.apache.commons.math.ode;
 
+import java.io.Serializable;
+
 /**
  * This class is a step handler that do nothing.
 
@@ -36,7 +38,7 @@
  */
 
 public class DummyStepHandler
-  implements StepHandler {
+  implements StepHandler, Serializable {
 
   /** Private constructor.
    * The constructor is private to prevent users from creating
@@ -87,5 +89,7 @@
 
   /** The only instance. */
   private static DummyStepHandler instance = null;
+
+  private static final long serialVersionUID = 2731635121223090252L;
 
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepInterpolator.java?rev=582682&r1=582681&r2=582682&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepInterpolator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DummyStepInterpolator.java
Sun Oct  7 14:19:14 2007
@@ -61,27 +61,6 @@
     super(y, forward);
   }
 
-  /** Copy constructor.
-
-   * <p>The copied interpolator should have been finalized before the
-   * copy, otherwise the copy will not be able to perform correctly
-   * any interpolation and will throw a {@link NullPointerException}
-   * later. Since we don't want this constructor to throw the
-   * exceptions finalization may involve and since we don't want this
-   * method to modify the state of the copied interpolator,
-   * finalization is <strong>not</strong> done automatically, it
-   * remains under user control.</p>
-
-   * <p>The copy is a deep copy: its arrays are separated from the
-   * original arrays of the instance.</p>
-
-   * @param interpolator interpolator to copy from.
-
-   */
-  protected DummyStepInterpolator(DummyStepInterpolator interpolator) {
-    super(interpolator);
-  }
-
   /** Compute the state at the interpolated time.
    * In this class, this method does nothing: the interpolated state
    * is always the state at the end of the current step.
@@ -94,6 +73,7 @@
    */
   protected void computeInterpolatedState(double theta, double oneMinusThetaH)
     throws DerivativeException {
+      System.arraycopy(currentState, 0, interpolatedState, 0, currentState.length);
   }
     
   public void writeExternal(ObjectOutput out)



Mime
View raw message