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

Deprecate and remove AllowNonVirtualCalls option

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • None
    • hotspot
    • None
    • behavioral
    • minimal
    • This allows some subtle old invokespecial behavior that nobody should be using anymore.
    • add/remove/modify command line option
    • JDK

      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.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: