5.5: Clarify that new/getstatic/etc only attempt to initialize

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 8
    • Component/s: specification
    • vm

      5.5 says "Upon execution of a new instruction, the referenced class is initialized if it has not been initialized already." and similarly for getstatic/putstatic/invokestatic. This can be read as saying that initialization not only starts but always succeeds, which is not accurate. Better to say:

      - Upon execution of a new instruction, the class to be initialized is the class referenced by the instruction.
      - Upon execution of a getstatic, putstatic, or invokestatic instruction, the class or interface to be initialized is the class or interface that declared the resolved field or method.

      In addition, the sentence "These instructions reference a class or interface directly or indirectly through a field reference or a method reference." is inaccurate because 'new' does not employ either kind of reference. The sentence doesn't add much, so should be removed.

            Assignee:
            Alex Buckley
            Reporter:
            Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: