You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason the new construct cannot cope with annotations on local variables. If I move the annotation to the method level it seems to get past the null pointer problem.
Why it fails on that exact instance is unclear, I have different java codebases where I use it on locals, fields or classes where I didn't see the issue surface.
Perhaps it has to do with the method being private (e.g. the variable was named local14 in the tree model).
More I wasn't able to determine whilst debugging on the release version of the Javac plugin.
I think I collected al relevant info. So far I still have the break on the code line just before the NullPointerException occurs should I need to attempt to gather anything else.
The text was updated successfully, but these errors were encountered:
Platform: VSCode/Metals/Bloop on Windows 10 with Java 8 GraalVM 20
This issue is a propagation of scalameta/metals#6191
It looks like it went sour in:
Still broken against v0.9.9 against which I did my debugging below.
It seems to be triggered by an annotation on a local variable
Which throws a
NullPointerException
hereJavacTrees
Because here
scip-java/semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbTrees.java
Line 87 in e4c4ffb
variableTreePath
ends up beingnull
.For some reason the new construct cannot cope with annotations on local variables. If I move the annotation to the method level it seems to get past the null pointer problem.
Why it fails on that exact instance is unclear, I have different java codebases where I use it on locals, fields or classes where I didn't see the issue surface.
Perhaps it has to do with the method being private (e.g. the variable was named
local14
in the tree model).More I wasn't able to determine whilst debugging on the release version of the Javac plugin.
I think I collected al relevant info. So far I still have the break on the code line just before the NullPointerException occurs should I need to attempt to gather anything else.
The text was updated successfully, but these errors were encountered: