added a missing synchronized bloc
JIRA: MATH-183 git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@618057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c090bf605
commit
fc4b86252e
|
@ -623,8 +623,10 @@ public class ResizableDoubleArray implements DoubleArray, Serializable {
|
|||
*/
|
||||
protected void setInitialCapacity(int initialCapacity) {
|
||||
if (initialCapacity > 0) {
|
||||
this.initialCapacity = initialCapacity;
|
||||
} else {
|
||||
synchronized(this) {
|
||||
this.initialCapacity = initialCapacity;
|
||||
}
|
||||
} else {
|
||||
String msg =
|
||||
"The initial capacity supplied: " + initialCapacity +
|
||||
"must be a positive integer";
|
||||
|
|
Loading…
Reference in New Issue