void () { myFileWatcher.setWatchRoots(() -> { synchronized (myLock) { if (!myWatcherRequiresUpdate) return null; myWatcherRequiresUpdate = false; var convert = File.separatorChar == '\\'; return createCanonicalPathMap(myFlatWatchRoots.navigableKeySet(), myOptimizedRecursiveWatchRoots, myPathMappings, convert); } }); }