commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r762136 - in /commons/proper/math/trunk: findbugs-exclude-filter.xml src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
Date Sun, 05 Apr 2009 19:10:44 GMT
Author: luc
Date: Sun Apr  5 19:10:44 2009
New Revision: 762136

URL: http://svn.apache.org/viewvc?rev=762136&view=rev
Log:
fixed findbugs warnings and added more explanation about the corresponding behavior in javadoc

Modified:
    commons/proper/math/trunk/findbugs-exclude-filter.xml
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java

Modified: commons/proper/math/trunk/findbugs-exclude-filter.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/findbugs-exclude-filter.xml?rev=762136&r1=762135&r2=762136&view=diff
==============================================================================
--- commons/proper/math/trunk/findbugs-exclude-filter.xml (original)
+++ commons/proper/math/trunk/findbugs-exclude-filter.xml Sun Apr  5 19:10:44 2009
@@ -85,6 +85,11 @@
     <Bug pattern="EI_EXPOSE_REP" />
   </Match>
   <Match>
+    <Class name="org.apache.commons.math.ode.sampling.MultistepStepInterpolator"/>
+    <Method name="reinitialize" params="double[],double[],double[][],boolean" returns="void"
/>
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
     <Class name="org.apache.commons.math.linear.BigMatrixImpl"/>
     <Method name="&lt;init>" params="java.math.BigDecimal[][],boolean" returns="void"
/>
     <Bug pattern="EI_EXPOSE_REP2" />

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java?rev=762136&r1=762135&r2=762136&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java
Sun Apr  5 19:10:44 2009
@@ -93,6 +93,8 @@
     }
 
     /** Reinitialize the instance
+     * <p>Beware that all arrays <em>must</em> be references to integrator
+     * arrays, in order to ensure proper update without copy.</p>
      * @param y reference to the integrator array holding the state at
      * the end of the step
      * @param previousT reference to the integrator array holding the times

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java?rev=762136&r1=762135&r2=762136&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/StepInterpolator.java
Sun Apr  5 19:10:44 2009
@@ -32,6 +32,14 @@
  * handlers can use these objects to retrieve the state vector at
  * intermediate times between the previous and the current grid points
  * (this feature is often called dense output).</p>
+ * <p>One important thing to note is that the step handlers may be so
+ * tightly bound to the integrators that they often share some internal
+ * state arrays. This imply that one should <em>never</em> use a direct
+ * reference to a step interpolator outside of the step handler, either
+ * for future use or for use in another thread. If such a need arise, the
+ * step interpolator <em>must</em> be copied using the dedicated
+ * {@link #copy()} method.
+ * </p>
  *
  * @see FirstOrderIntegrator
  * @see SecondOrderIntegrator



Mime
View raw message