Author: erans
Date: Sun Dec 16 00:45:18 2012
New Revision: 1422433
URL: http://svn.apache.org/viewvc?rev=1422433&view=rev
Log:
MATH-757
Class was not thread-safe.
Comment added to warn users that they must handle synchronization by
themselves if they need it.
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java?rev=1422433&r1=1422432&r2=1422433&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/ResizableDoubleArray.java
Sun Dec 16 00:45:18 2012
@@ -33,6 +33,9 @@ import org.apache.commons.math3.exceptio
* handles expanding and contracting its internal storage array as elements
* are added and removed.
* </p>
+ * <h3>Important note: Usage should not assume that this class is thread-safe
+ * even though some of the methods are {@code synchronized}.
+ * This qualifier will be dropped in the next major release (4.0).</h3>
* <p>
* The internal storage array starts with capacity determined by the
* {@code initialCapacity} property, which can be set by the constructor.
@@ -930,7 +933,7 @@ public class ResizableDoubleArray implem
* @return the result.
* @since 3.1
*/
- public synchronized double compute(MathArrays.Function f) {
+ public double compute(MathArrays.Function f) {
return f.evaluate(internalArray, startIndex, numElements);
}