Skip to content

NPE on hyperlink request#4836

Merged
srikanth-sankaran merged 1 commit intoeclipse-jdt:masterfrom
srikanth-sankaran:npe-on-hover
Feb 13, 2026
Merged

NPE on hyperlink request#4836
srikanth-sankaran merged 1 commit intoeclipse-jdt:masterfrom
srikanth-sankaran:npe-on-hover

Conversation

org.eclipse.jdt.internal.compiler.lookup.BlockScope.getBinding(char[],
int, org.eclipse.jdt.internal.compiler.lookup.InvocationSite, boolean)
because scope is null" on hyperlink request

* Fixes eclipse-jdt#4217
@srikanth-sankaran
Copy link
Contributor Author

srikanth-sankaran commented Feb 13, 2026

@jarthana - Could you please review this for 4.39 RC1 ? TIA.

Basically, the problem is that since the lambda features as an argument of an unknown method, the second resolution of the lambda (after the target type is determined post overload resolution) does not happen. The lambda body is never traversed for the purpose of resolution and scope of the body block is null.

Fix is to recognize this condition and not descend into the lambda at all - since unresolved AST nodes are full of null references.
This won't somehow magically make selection work under such broken situations, but we won't NPE.

@srikanth-sankaran
Copy link
Contributor Author

Thanks Jay!

@srikanth-sankaran srikanth-sankaran merged commit 6a6c5d2 into eclipse-jdt:master Feb 13, 2026
13 checks passed
@srikanth-sankaran srikanth-sankaran deleted the npe-on-hover branch February 13, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants