proper concurrent map used
authorAlexey Kudravtsev <cdr@intellij.com>
Wed, 1 Feb 2012 12:00:45 +0000 (16:00 +0400)
committerAlexey Kudravtsev <cdr@intellij.com>
Thu, 2 Feb 2012 09:18:30 +0000 (13:18 +0400)
java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsManagerImpl.java

index ab6284cc9eb3a2d83e4fe113f4f4925c21e9d21c..bac7e47a1e4892f9c7f93b7d8d79810ab4b1c666 100644 (file)
@@ -65,7 +65,7 @@ import com.intellij.psi.xml.XmlDocument;
 import com.intellij.psi.xml.XmlFile;
 import com.intellij.psi.xml.XmlTag;
 import com.intellij.util.*;
-import com.intellij.util.containers.ConcurrentWeakHashMap;
+import com.intellij.util.containers.ConcurrentWeakValueHashMap;
 import com.intellij.util.messages.MessageBusConnection;
 import com.intellij.util.ui.OptionsMessageDialog;
 import org.jetbrains.annotations.NonNls;
@@ -84,7 +84,7 @@ public class ExternalAnnotationsManagerImpl extends ExternalAnnotationsManager {
   public static final Icon ICON = IconLoader.getIcon("/modules/annotation.png");
   private static final Logger LOG = Logger.getInstance("#" + ExternalAnnotationsManagerImpl.class.getName());
 
-  private final Map<String, List<XmlFile>> myExternalAnnotations = new ConcurrentWeakHashMap<String, List<XmlFile>>();
+  private final Map<String, List<XmlFile>> myExternalAnnotations = new ConcurrentWeakValueHashMap<String, List<XmlFile>>();
   private final AtomicReference<ThreeState> myHasAnyAnnotationsRoots = new AtomicReference<ThreeState>(ThreeState.UNSURE);
   private static final List<XmlFile> NULL = new ArrayList<XmlFile>();
   private final PsiManager myPsiManager;