EA-70653 - NPE: PsiFileNode.canRepresent

This commit is contained in:
peter
2015-07-10 20:38:52 +02:00
parent 1fdb939e91
commit af2ce7d610
@@ -201,7 +201,10 @@ public class PsiFileNode extends BasePsiNode<PsiFile> implements NavigatableWith
@Override
public boolean canRepresent(final Object element) {
return super.canRepresent(element) || getValue() != null && element != null && element.equals(getValue().getVirtualFile());
if (super.canRepresent(element)) return true;
PsiFile value = getValue();
return value != null && element != null && element.equals(value.getVirtualFile());
}
@Override