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

Duplicate PermittedSubclasses entries with doclint enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • tools
    • None
    • 17
    • b10

      javac emits duplicate entries in the constant pool and PermittedSubclasses attribute for the following example.

      I don't think the JVMS disallows this, but the duplication is surprising to me and looks accidental.

      This only reproduces with -Xdoclint:html,syntax

      public class T {
        private enum E {
          INSTANCE {
            /** foo {@link E} */
            void f() {}
          };

          void f() {}
        }
      }

      javac -fullversion
      javac full version "25-ea+8-843"

      javac -Xdoclint:html,syntax T.java && javap -v -p 'T$E'
      ...
      PermittedSubclasses:
        T$E$1
        T$E$1
      InnerClasses:
        private static #52= #1 of #47; // E=class T$E of class T
        final #26; // class T$E$1
        final #50; // class T$E$1

            cushon Liam Miller-Cushon
            cushon Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: