Fixed concurrent modification on FileWatcher

This commit is contained in:
Rsl1122 2019-03-03 19:12:48 +02:00
parent 1f341c0921
commit d2551a206d

View File

@ -116,7 +116,7 @@ public class FileWatcher extends Thread {
}
private void actOnModification(Path modifiedFile) {
for (WatchedFile watchedFile : watchedFiles) {
for (WatchedFile watchedFile : new HashSet<>(watchedFiles)) {
watchedFile.modified(modifiedFile);
}
}