Integrated: 8337998: CompletionFailure in getEnclosingType attaching type annotations
Liam Miller-Cushon
cushon at openjdk.org
Tue Aug 13 15:08:56 UTC 2024
On Wed, 7 Aug 2024 15:59:58 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.
This pull request has now been integrated.
Changeset: 9e282e5c
Author: Liam Miller-Cushon <cushon at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9e282e5c966a9c065de8b901b7d30bb5c9ccf243
Stats: 116 lines in 4 files changed: 113 ins; 0 del; 3 mod
8337998: CompletionFailure in getEnclosingType attaching type annotations
Reviewed-by: vromero
-------------
PR: https://git.openjdk.org/jdk/pull/20495
More information about the compiler-dev
mailing list