Fixed findbugs warning.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1462504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2013-03-29 15:48:57 +00:00
parent 8a25d709f5
commit 6500be3b99
1 changed files with 9 additions and 1 deletions

View File

@ -934,7 +934,15 @@ public class ResizableDoubleArray implements DoubleArray, Serializable {
* @since 3.1
*/
public double compute(MathArrays.Function f) {
return f.evaluate(internalArray, startIndex, numElements);
final double[] array;
final int start;
final int num;
synchronized(this) {
array = internalArray;
start = startIndex;
num = numElements;
}
return f.evaluate(array, start, num);
}
/**