From d7e8e2acf188b407de41ba8e47f30008b6148e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Fri, 29 Nov 2013 17:37:34 +0100 Subject: [PATCH 1/4] CodeInsightTestUtil#doIntentionTest(): remove Throwable declaration --- .../intellij/testFramework/fixtures/CodeInsightTestUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java index dd06c0d0a23d..d73a4d8aaf51 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestUtil.java @@ -72,7 +72,7 @@ public class CodeInsightTestUtil { return null; } - public static void doIntentionTest(CodeInsightTestFixture fixture, @NonNls String file, @NonNls String actionText) throws Throwable { + public static void doIntentionTest(CodeInsightTestFixture fixture, @NonNls String file, @NonNls String actionText) { doIntentionTest(fixture, actionText, file + ".xml", file + "_after.xml"); } From a776fa89b68b04e29e8f0bccfffe2cd8b51ca3a4 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 2 Dec 2013 13:53:13 +0400 Subject: [PATCH 2/4] EA-52324 - assert: ClassMappingNameConverter.getVariants: diagnostics --- .../src/com/intellij/util/xml/ClassMappingNameConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/openapi/src/com/intellij/util/xml/ClassMappingNameConverter.java b/java/openapi/src/com/intellij/util/xml/ClassMappingNameConverter.java index 3c81020fcb52..c6e03c951aa0 100644 --- a/java/openapi/src/com/intellij/util/xml/ClassMappingNameConverter.java +++ b/java/openapi/src/com/intellij/util/xml/ClassMappingNameConverter.java @@ -52,7 +52,7 @@ public class ClassMappingNameConverter extends ResolvingConverter.StringConverte if (classElement == null) return Collections.emptyList(); Object value = ((GenericDomValue)classElement).getValue(); if (value == null) return Collections.emptyList(); - assert value instanceof PsiClass : classElement + " should have PsiClass type"; + assert value instanceof PsiClass : classElement + " should have PsiClass type, but was " + value; PsiClass psiClass = (PsiClass)value; JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(context.getProject()); From 90c30da133d6a24d59be2dbd7ecab4a0b4f11121 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 2 Dec 2013 14:02:13 +0400 Subject: [PATCH 3/4] EA-51912 - IAE: CachedValueProvider$Result. --- .../src/com/intellij/psi/impl/source/xml/XmlEntityCache.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlEntityCache.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlEntityCache.java index b361463749a3..8f91c22899a1 100644 --- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlEntityCache.java +++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlEntityCache.java @@ -1,6 +1,7 @@ package com.intellij.psi.impl.source.xml; import com.intellij.openapi.util.Key; +import com.intellij.openapi.util.ModificationTracker; import com.intellij.psi.*; import com.intellij.psi.util.CachedValue; import com.intellij.psi.util.CachedValueProvider; @@ -27,7 +28,7 @@ public class XmlEntityCache { if (declElement instanceof XmlEntityDecl && declElement.isValid() && name.equals(((XmlEntityDecl)declElement).getName())) return new Result((XmlEntityDecl)declElement, declElement); cachingMap.put(name,null); - return new Result(null,null); + return new Result(null, ModificationTracker.NEVER_CHANGED); } }, false From 676382271306039f13d61d1ff6b9d9e7170f69de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 2 Dec 2013 11:29:19 +0100 Subject: [PATCH 4/4] EA-51913 - assert: DomNamespaceKeyIndex.hasStubElementsWithNamespaceKey --- .../com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java index 9ff7b3252b4c..a585f8834c25 100644 --- a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java +++ b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java @@ -42,7 +42,7 @@ public class DomNamespaceKeyIndex extends StringStubIndexExtension { public boolean hasStubElementsWithNamespaceKey(final DomFileElement domFileElement, final String namespaceKey) { final VirtualFile file = domFileElement.getFile().getVirtualFile(); - assert file instanceof VirtualFileWithId : file; + if (!(file instanceof VirtualFileWithId)) return false; final int virtualFileId = ((VirtualFileWithId)file).getId(); CommonProcessors.FindFirstProcessor processor =