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

Generated default constructor must be marked using SYNTHETIC attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • specification
    • None
    • generic
    • linux_2.4

      A class member that does not appear in the source code must be marked using a Synthetic attribute. This is according to the Java Virtual Machine specification (§4.7.6). Javac did not mark default constructor using a Synthetic attribute.
      To see the problem compile following class:

      public class Test {
          public void x(){}
      }

      and check using classfile inspector that <init> method does not have SYNTHETIC attribute. This bug is also in javac 1.3.1-b24

            abuckley Alex Buckley
            thurka Tomáš Hůrka
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: