RFR: 8337998: CompletionFailure in getEnclosingType attaching type annotations [v3]

Vicente Romero vromero at openjdk.org
Tue Aug 13 13:20:52 UTC 2024


On Tue, 13 Aug 2024 01:01:07 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> This change fixes a `CompletionFailure` crash in javac when a missing class is discovered while attaching type annotations read from a class file.
>> 
>> Type annotations on classes are located with a type path starting on the 'outermost part of the type for which a type annotation is admissible', so annotating a type requires knowing its outer classes, and the call to `ClassType#getEnclosingType` can cause additional symbols to be completed.
>> 
>> This change handles the completion failures, and reports an error diagnostic instead of the current crash.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update bug number and summary

lgtm, thanks!

-------------

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20495#pullrequestreview-2235532067


More information about the compiler-dev mailing list