Skip to content

Commit 250abf1

Browse files
committed
Prevent NPE
1 parent 2661eaa commit 250abf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ ITypeBinding resolveType(RecordDeclaration type) {
730730
ITypeBinding resolveType(TypeDeclaration type) {
731731
resolve();
732732
JCTree javacNode = this.converter.domToJavac.get(type);
733-
if (javacNode instanceof JCClassDecl jcClassDecl && "<any?>".equals(javacNode.type.toString())) {
733+
if (javacNode instanceof JCClassDecl jcClassDecl && (javacNode.type != null && "<any?>".equals(javacNode.type.toString()))) {
734734
return new JavacErrorTypeBinding(javacNode.type, javacNode.type.tsym, null, true, JavacBindingResolver.this, jcClassDecl.sym);
735735
}
736736
if (javacNode instanceof JCClassDecl jcClassDecl && jcClassDecl.type != null) {

0 commit comments

Comments
 (0)