Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #3052.
Here is why this bug is happening:
Eclipse jdt tells us that the binding of the
listener
variable inside the lambda is null in noclasspath mode,so we run
createVariableAccessNoClasspath()
, it callsgetVariableDeclaration()
, which usesclassFactory.create()
for inner classes improperly. This leads to the creation of a new top-level classFailing
(with unknown position), so references get messed up and we get this new class with no position instead of the originalFailing
.More specifically the problem was that the description of the
classFactory.create()
said that it can handle both.
and$
, but its implementation handles only$
, so I addedgetNormalQualifiedName()
and fixed context builder. By the way, it's not possible to handle them both inclassFactory.create()
, since.
is used as a package separator and$
as an inner type separator and we need to distinguish between the two of them.