Consider code like:
---
import java.lang.annotation.*;
public class PrintingTest<T extends CharSequence> extends @TA Object {
}
@Target(ElementType.TYPE_USE)
@interface TA {}
---
When using `-Xprint` to print this code, the type variable bound is missing, and so is the type annotation on the supertype (as the whole supertype is missing):
---
$ javac -Xprint /tmp/PrintingTest.java
public class PrintingTest<T> {
public PrintingTest();
}
@java.lang.annotation.Target({TYPE_USE})
@interface TA {
}
---
It would be better if type variable bounds and type annotations would be included.
---
import java.lang.annotation.*;
public class PrintingTest<T extends CharSequence> extends @TA Object {
}
@Target(ElementType.TYPE_USE)
@interface TA {}
---
When using `-Xprint` to print this code, the type variable bound is missing, and so is the type annotation on the supertype (as the whole supertype is missing):
---
$ javac -Xprint /tmp/PrintingTest.java
public class PrintingTest<T> {
public PrintingTest();
}
@java.lang.annotation.Target({TYPE_USE})
@interface TA {
}
---
It would be better if type variable bounds and type annotations would be included.
- csr for
-
JDK-8356058 PrintingProcessor (-Xprint) does not print type variable bounds and type annotations for Object supertypes
-
- Provisional
-
- links to
-
Review(master) openjdk/jdk/25002