Added synchronized when iterating over synchronizedList as per Java specification
This commit is contained in:
parent
a0249da8a7
commit
3c6c1d973c
|
@ -836,8 +836,10 @@ public class NNStorage extends Storage implements Closeable,
|
|||
* @param sds A list of storage directories to mark as errored.
|
||||
*/
|
||||
void reportErrorsOnDirectories(List<StorageDirectory> sds) {
|
||||
for (StorageDirectory sd : sds) {
|
||||
reportErrorsOnDirectory(sd);
|
||||
synchronized(sds) {
|
||||
for (StorageDirectory sd : sds) {
|
||||
reportErrorsOnDirectory(sd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue