Skip to content

Commit 23f3e25

Browse files
Rob Strykermickaelistria
authored andcommitted
NPE in binding resolver
Signed-off-by: Rob Stryker <[email protected]>
1 parent f1c2e75 commit 23f3e25

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
@@ -1301,7 +1301,7 @@ && isTypeOfType(expression.type)
13011301
if (jcTree instanceof JCTypeCast jcCast && jcCast.getType() != null) {
13021302
return this.bindings.getTypeBinding(jcCast.getType().type);
13031303
}
1304-
if (jcTree instanceof JCLiteral jcLiteral && jcLiteral.type.isErroneous()) {
1304+
if (jcTree instanceof JCLiteral jcLiteral && jcLiteral.type != null && jcLiteral.type.isErroneous()) {
13051305
if (jcLiteral.typetag == TypeTag.CLASS) {
13061306
return resolveWellKnownType("java.lang.String");
13071307
} else if (jcLiteral.typetag == TypeTag.BOT) {

0 commit comments

Comments
 (0)