-
Bug
-
Resolution: Fixed
-
P4
-
8
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.
- 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.