Added synchronized when iterating over synchronizedList as per Java specification

This commit is contained in:
emopers 2015-12-28 08:59:56 -06:00 committed by Wajihulhassan
parent a0249da8a7
commit 3c6c1d973c
1 changed files with 4 additions and 2 deletions

View File

@ -836,10 +836,12 @@ public class NNStorage extends Storage implements Closeable,
* @param sds A list of storage directories to mark as errored.
*/
void reportErrorsOnDirectories(List<StorageDirectory> sds) {
synchronized(sds) {
for (StorageDirectory sd : sds) {
reportErrorsOnDirectory(sd);
}
}
}
/**
* Reports that a directory has experienced an error.