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

Liam Miller-Cushon cushon at openjdk.org
Tue Aug 13 01:01:07 UTC 2024


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20495/files
  - new: https://git.openjdk.org/jdk/pull/20495/files/a1e7e33d..1ccd79d2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20495&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20495&range=01-02

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/20495.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20495/head:pull/20495

PR: https://git.openjdk.org/jdk/pull/20495


More information about the compiler-dev mailing list