DirtyPaths () { DirtyPaths dirtyPaths = DirtyPaths.EMPTY; synchronized (myLock) { if (!myDirtyPaths.isEmpty()) { dirtyPaths = myDirtyPaths; myDirtyPaths = new DirtyPaths(); } } PluggableFileWatcher.EP_NAME.forEachExtensionSafe(watcher -> watcher.resetChangedPaths()); return dirtyPaths; }