RFR: 8356057: PrintingProcessor (-Xprint) does not print type variable bounds and type annotations for Object supertypes [v2]
Jan Lahoda
jlahoda at openjdk.org
Mon May 5 15:02:34 UTC 2025
> 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, javac produces this:
>
> public class PrintingTest<T> {
>
> public PrintingTest();
> }
>
> @java.lang.annotation.Target({TYPE_USE})
> @interface TA {
> }
>
>
> Note the type variable is missing the bound, and the annotated supertype is missing. This PR proposes to change that to:
>
> public class PrintingTest<T extends java.lang.CharSequence> extends java.lang. at TA Object {
>
> public PrintingTest();
> }
>
> @java.lang.annotation.Target({TYPE_USE})
> @interface TA {
> }
>
>
> Please also review the CSR:
> https://bugs.openjdk.org/browse/JDK-8356058
> and the release note:
> https://bugs.openjdk.org/browse/JDK-8356062
Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
Reflecting review feedback: using isImportantType instead of isUnimportantObjectType.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25002/files
- new: https://git.openjdk.org/jdk/pull/25002/files/a9f7be23..e78e88a6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25002&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25002&range=00-01
Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/25002.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25002/head:pull/25002
PR: https://git.openjdk.org/jdk/pull/25002
More information about the compiler-dev
mailing list