mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-37886 - NPE: JavaPsiFacadeImpl$PsiElementFinderImpl.compare
This commit is contained in:
@@ -34,6 +34,7 @@ import com.intellij.psi.impl.source.resolve.FileContextUtil;
|
||||
import com.intellij.psi.impl.source.tree.JavaElementType;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.PsiModificationTracker;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.util.ConcurrencyUtil;
|
||||
import com.intellij.util.Processor;
|
||||
import com.intellij.util.SmartList;
|
||||
@@ -333,7 +334,9 @@ public class JavaPsiFacadeImpl extends JavaPsiFacadeEx {
|
||||
ContainerUtil.quickSort(list, new Comparator<PsiClass>() {
|
||||
@Override
|
||||
public int compare(PsiClass o1, PsiClass o2) {
|
||||
return scope.compare(o2.getContainingFile().getVirtualFile(), o1.getContainingFile().getVirtualFile());
|
||||
VirtualFile file2 = PsiUtil.getVirtualFile(o2);
|
||||
VirtualFile file1 = PsiUtil.getVirtualFile(o1);
|
||||
return scope.compare(file2, file1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -149,6 +149,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
|
||||
return GlobalSearchScope.this.isSearchInLibraries();
|
||||
}
|
||||
|
||||
@NonNls
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UnionToLocal: (" + GlobalSearchScope.this.toString() + ", " + scope + ")";
|
||||
@@ -368,6 +369,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
|
||||
return 31 * myScope1.hashCode() + myScope2.hashCode();
|
||||
}
|
||||
|
||||
@NonNls
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Intersection: (" + myScope1 + ", " + myScope2 + ")";
|
||||
@@ -518,9 +520,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
|
||||
|
||||
FileTypeRestrictionScope that = (FileTypeRestrictionScope)o;
|
||||
|
||||
if (!Arrays.equals(myFileTypes, that.myFileTypes)) return false;
|
||||
|
||||
return true;
|
||||
return Arrays.equals(myFileTypes, that.myFileTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-2
@@ -358,8 +358,7 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
|
||||
return Pair.create(myInfoPanel.getText(), myCurrentRequestor);
|
||||
}
|
||||
|
||||
boolean logMode = myInfoPanel.updateText(requestor == EventLog.LOG_REQUESTOR
|
||||
? "" : text);
|
||||
boolean logMode = myInfoPanel.updateText(requestor == EventLog.LOG_REQUESTOR ? "" : text);
|
||||
myCurrentRequestor = logMode ? EventLog.LOG_REQUESTOR : requestor;
|
||||
return Pair.create(text, requestor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user