more diagnostics for EA-106944 - NPE: ContributorsBasedGotoByModel.getElementName

This commit is contained in:
peter
2017-09-18 17:55:05 +02:00
parent 96b824ca2b
commit fecb75f113
@@ -254,7 +254,7 @@ public abstract class ContributorsBasedGotoByModel implements ChooseByNameModelE
@Override
public String getElementName(Object element) {
if (!(element instanceof NavigationItem)) {
throw new AssertionError(element + " of " + element.getClass());
throw new AssertionError((element == null ? "null" : element + " of " + element.getClass()) + " in " + this + " of " + getClass());
}
return ((NavigationItem)element).getName();
}