mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplify equality for ClsElementInfo: no other kind of info can reference cls psi (EA-73898 - assert: PsiFileImpl.getStubTree)
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
package com.intellij.psi.impl.smartPointers;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Segment;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiAnchor;
|
||||
@@ -47,10 +46,7 @@ public class ClsElementInfo extends SmartPointerElementInfo {
|
||||
|
||||
@Override
|
||||
public boolean pointsToTheSameElementAs(@NotNull SmartPointerElementInfo other) {
|
||||
if (other instanceof ClsElementInfo) {
|
||||
return myStubIndexReference.equals(((ClsElementInfo)other).myStubIndexReference);
|
||||
}
|
||||
return Comparing.equal(restoreElement(), other.restoreElement());
|
||||
return other instanceof ClsElementInfo && myStubIndexReference.equals(((ClsElementInfo)other).myStubIndexReference);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user