Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356057

PrintingProcessor (-Xprint) does not print type variable bounds and type annotations for Object supertypes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 25
    • tools
    • None

      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.

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: