RFR: 8187655: jdk.lambda.vm.InterfaceAccessFlagsTest.testPrivateMethodCall needs update after nestmates support [v2]

Mandy Chung mchung at openjdk.org
Tue Nov 7 18:34:42 UTC 2023


> `jdk.lambda.vm.InterfaceAccessFlagsTest` uses `ClassToInterfaceConverter` to mechanically convert a classfile for a Class into an in-memory class representation of an equivalent Interface.  `testPrivateMethodCall`  tests to invoke a private method. Before nestmates, invoking a private class method and a private interface method both use `Invokespecial`.   With the nestmate changes, the class uses `invokevirtual` but the interface must use `invokeinterface` but this conversion is not handled by the existing `ClassToInterfaceConverter`.
> 
> This fix converts `ClassToInterfaceConverter` to use the Class-File API to properly convert a classfile from a class to an interface including method invocation from `invokevirtual` to `invokeinterface`.  The old custom bytecode manipulation code can be dropped.

Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:

  Simplify the transformation code and easier to read

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/16526/files
  - new: https://git.openjdk.org/jdk/pull/16526/files/8f4e9056..7feb2ffc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16526&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16526&range=00-01

  Stats: 40 lines in 1 file changed: 0 ins; 21 del; 19 mod
  Patch: https://git.openjdk.org/jdk/pull/16526.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16526/head:pull/16526

PR: https://git.openjdk.org/jdk/pull/16526


More information about the core-libs-dev mailing list