mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
avoid IncompleteHierarchyException instantiation
This commit is contained in:
+3
@@ -22,6 +22,9 @@ class IncompleteHierarchyException extends Exception {
|
||||
@SuppressWarnings("ThrowableInstanceNeverThrown")
|
||||
public static final IncompleteHierarchyException INSTANCE = new IncompleteHierarchyException();
|
||||
|
||||
private IncompleteHierarchyException() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
return this;
|
||||
|
||||
@@ -60,7 +60,7 @@ abstract class QualifiedName {
|
||||
}
|
||||
|
||||
static class Interned extends QualifiedName {
|
||||
@QNameId final int id;
|
||||
@QNameHash final int id;
|
||||
|
||||
Interned(int id) {
|
||||
this.id = id;
|
||||
@@ -71,7 +71,7 @@ abstract class QualifiedName {
|
||||
throws IncompleteHierarchyException {
|
||||
Symbol.ClassSymbol[] candidates = resolver.findGlobalType(id);
|
||||
if (candidates.length == 0) {
|
||||
throw new IncompleteHierarchyException();
|
||||
throw IncompleteHierarchyException.INSTANCE;
|
||||
}
|
||||
|
||||
Collections.addAll(result, candidates);
|
||||
|
||||
Reference in New Issue
Block a user