-
Bug
-
Resolution: Fixed
-
P2
-
None
-
b06
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8336138 | 23.0.1 | Liam Miller-Cushon | P2 | Resolved | Fixed | b03 |
JDK-8335926 | 23 | Liam Miller-Cushon | P2 | Resolved | Fixed | b31 |
That wrapper bypasses logic in RichDiagnosticFormatter that preprocesses arguments, including types. The missing preprocessing for types wrapped in JCDiagnostic.AnnotatedType causes crashes when the types are printed:
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
public class T {
@Target(ElementType.TYPE_USE)
@interface TA {}
static class A {
static class B<T> {}
}
<T> @TA A.B<T> f() {}
}
$ javac T.java
java.lang.AssertionError: Missing type variable in where clause: T
at jdk.compiler/com.sun.tools.javac.util.RichDiagnosticFormatter.unique(RichDiagnosticFormatter.java:249)
at jdk.compiler/com.sun.tools.javac.util.RichDiagnosticFormatter$RichPrinter.visitTypeVar(RichDiagnosticFormatter.java:400)
at jdk.compiler/com.sun.tools.javac.util.RichDiagnosticFormatter$RichPrinter.visitTypeVar(RichDiagnosticFormatter.java:342)
at jdk.compiler/com.sun.tools.javac.code.Type$TypeVar.accept(Type.java:1709)
- backported by
-
JDK-8335926 AssertionError: Missing type variable in where clause
- Resolved
-
JDK-8336138 AssertionError: Missing type variable in where clause
- Resolved
- relates to
-
JDK-8291643 Consider omitting type annotations from type error diagnostics
- Resolved
-
JDK-8043226 Better diagnostics for non-applicable type annotations
- Resolved
- links to
-
Commit openjdk/jdk/babf6df7
-
Commit openjdk/jdk/ca37a482
-
Review openjdk/jdk/19840
-
Review(jdk23) openjdk/jdk/20085
(3 links to)