diagnostics for EA-89836 - CCE: ContributorsBasedGotoByModel.getElementName
authorpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 18:15:42 +0000 (19:15 +0100)
committerpeter <peter@jetbrains.com>
Wed, 16 Nov 2016 18:27:20 +0000 (19:27 +0100)
platform/lang-impl/src/com/intellij/ide/util/gotoByName/ContributorsBasedGotoByModel.java

index f184e3c40f57889488587f21b2f6e2cbbc05501b..a0a112f1e7fa282fe20f6f65d86d22da376e1916 100644 (file)
@@ -269,6 +269,9 @@ public abstract class ContributorsBasedGotoByModel implements ChooseByNameModelE
 
   @Override
   public String getElementName(Object element) {
+    if (!(element instanceof NavigationItem)) {
+      throw new AssertionError(element + " of " + element.getClass());
+    }
     return ((NavigationItem)element).getName();
   }