Summary
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 semantics. This option should be removed. We shouldn't allow old lookup semantics for invokevirtual.
Problem
For invokespecial the JVM specification describes the lookup procedure where the actual method to be invoked is selected. This option causes the invokespecial lookup to not follow the specification.
Solution
Deprecate the option in jdk 11, obsolete it in jdk 12 and remove it completely in jdk 13.
Specification
See solution.
- csr of
-
JDK-8202606 Deprecate AllowNonVirtualCalls option
-
- Resolved
-