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

javac generates an InnerClasses attribute in unexpected situations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 17
    • 14, 15
    • tools
    • None
    • 14

      This bug was found by Luke Hutchison,
      i independently verify it.

      when compiling a record like this:
      record Foo(int x, int y) { }

      then decompile it using javap -verbose Foo.class, at the end,
      you can see that the InnerClasses attribute is generated (it should not), and with weird values.

      InnerClasses:
        public static final #55= #51 of #53; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles

      The bug is reproducible with java 14 or latest java 15.

            asotona Adam Sotona
            forax RĂ©mi Forax
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: