The JVM ignores the ACC_SUPER flag when looking up the method to call for invokespecial, and looks up the method in the closest super class of the caller class. There's a good description of ACC_SUPER in stackoverflow:
https://stackoverflow.com/questions/8949933/what-is-the-purpose-of-the-acc-super-access-flag-on-java-class-files
The AllowNonVirtualCalls option was added for backward compatibility in case of code that relied on the old 1.0 invokenonvirtual semantics instead of the current correct invokespecial sematics. This option should be removed. We shouldn't allow old lookup semantics for invokevirtual.
https://stackoverflow.com/questions/8949933/what-is-the-purpose-of-the-acc-super-access-flag-on-java-class-files
The AllowNonVirtualCalls option was added for backward compatibility in case of code that relied on the old 1.0 invokenonvirtual semantics instead of the current correct invokespecial sematics. This option should be removed. We shouldn't allow old lookup semantics for invokevirtual.
- clones
-
JDK-8202606 Deprecate AllowNonVirtualCalls option
-
- Resolved
-