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

[lworld] Make Object an abstract class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • repo-valhalla
    • hotspot

      The latest JVMS draft for Value classes states that the class java.lang.Object must be abstract:

      "The class Object is assumed to be declared abstract with its ACC_PERMITS_VALUE flag set."

      The JVMS draft also specifies that the bytecode new must have a special behavior when used with the java.lang.Object class in argument:

      "A modern class file should avoid applying the new opcode to the class Object, which is abstract and cannot be instantiated directly. However, for compatibility with bytecode written when Object was not abstract, the Java Virtual Machine supports these instructions by creating instances of the class Identity. The verifier will expect the instruction to be followed by an invocation of the instance initialization method of Object, not Identity, but this anomaly is tolerable because the Identity class requires no initialization."

            fparain Frederic Parain
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: