IDEA-54251 (IDEA incorrectly altering grailsPlugins.iml file on Cache Invalidation)

This commit is contained in:
Sergey Evdokimov
2011-07-25 16:48:29 +04:00
parent 307b6be739
commit a829389254
@@ -27,16 +27,16 @@ public class MvcWatchedRootProvider implements WatchedRootsProvider {
@NotNull
public Set<String> getRootsToWatch() {
if (!myProject.isInitialized()) {
return Collections.emptySet();
}
if (!myProject.isInitialized()) return Collections.emptySet();
final Set<String> result = new HashSet<String>();
Set<String> result = null;
for (Module module : ModuleManager.getInstance(myProject).getModules()) {
final MvcFramework framework = MvcModuleStructureSynchronizer.getFramework(module);
if (framework == null) continue;
if (result == null) result = new HashSet<String>();
final File sdkWorkDir = framework.getCommonPluginsDir(module);
if (sdkWorkDir != null) {
result.add(sdkWorkDir.getAbsolutePath());
@@ -48,7 +48,7 @@ public class MvcWatchedRootProvider implements WatchedRootsProvider {
}
}
return result;
return result == null ? Collections.<String>emptySet() : result;
}
}