From ba096e237bc2a69a5a6e9424657aef6986b2b006 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 6 Apr 2016 18:51:54 +0200 Subject: [PATCH] [vfs] minor memory optimization --- .../src/com/intellij/openapi/vfs/impl/local/FileWatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java index 85a570c1547f..eb6c7fd564ef 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java @@ -184,7 +184,7 @@ public class FileWatcher { @Override public void notifyManualWatchRoots(@NotNull Collection roots) { - myManualWatchRoots.add(ContainerUtil.newHashSet(roots)); + myManualWatchRoots.add(roots.isEmpty() ? Collections.emptySet() : ContainerUtil.newHashSet(roots)); notifyOnAnyEvent(); }