RFR: 8337998: CompletionFailure in getEnclosingType attaching type annotations

Vicente Romero vromero at openjdk.org
Fri Aug 9 18:06:31 UTC 2024


On Fri, 9 Aug 2024 17:49:23 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> test/langtools/tools/javac/annotations/typeAnnotations/CompletionErrorOnEnclosingType.java line 78:
>> 
>>> 76: 
>>> 77:         // now if we remove A.class there will be an error but javac should not crash
>>> 78:         tb.deleteFiles(out.resolve("A.class"));
>> 
>> here the problem doesn't seem to be with the annotation not being found but with the annotated type not being found right?
>
> Yes if the annotation is missing that should get handled earlier, the issue here is if visiting the annotated type causes completion failures, e.g. when calling `getEnclosingType`.

right I guess I was confused by the key in the error message: `type.annotation.not.found`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20495#discussion_r1711917467


More information about the compiler-dev mailing list