mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javac ast indices: handle invalid code case
This commit is contained in:
@@ -197,7 +197,7 @@ public interface JavacRef {
|
||||
private static boolean checkEnclosingElement(Element element) {
|
||||
Element enclosingElement = element.getEnclosingElement();
|
||||
if (enclosingElement == null) return false;
|
||||
TypeMirror type = element.asType();
|
||||
TypeMirror type = enclosingElement.asType();
|
||||
if (type == null || type.getKind() == TypeKind.NONE || type.getKind() == TypeKind.OTHER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user