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:
parent
8a25d709f5
commit
6500be3b99
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue