Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8165827

Support private interface methods in JNI, JDWP, JDI and JDB

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P2
    • Resolution: Approved
    • Fix Version/s: 9
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Support for a new feature does not impact existing features.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Update the JNI, JDWP, JDI and JDB specifications to account for private interface methods as needed.

      Problem

      JDK 8 introduced private interface methods at the VM level, and JDK 9 has now enabled them at the language level. The other platform interface specifications (JNI, JDWP, JDI) may need to be updated to allow for this new addition.

      Solution

      The JNI specification requires no change to allow for private interface methods. The implementation was fixed under JDK-8081800.

      The JDWP specification also requires no changes.

      The JDI specification requires one change - ObjectReference.invokeMethod states that it throws IllegalArgumentexception if the invocation mode is non-virtual and the method is either abstract or a non-default interface method. This precludes non-virtual invocation of private interface methods as they are "non-default interface methods". So we modify that clause to simply exclude abstract methods. The implementation is adjusted accordingly.

      Specification

      @throws java.lang.IllegalArgumentException if the method is not
      a member of this object's class, if the size of the argument list
      does not match the number of declared arguments for the method,
      if the method is a constructor or static initializer, or
      if {@link #INVOKE_NONVIRTUAL} is specified and the method is
      abstract.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dholmes David Holmes
                Reporter:
                dholmes David Holmes
                Reviewed By:
                Frederic Parain
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: