RFR: 8307818: Convert Indify tool to Classfile API [v4]

Chen Liang liach at openjdk.org
Mon May 20 15:47:23 UTC 2024


On Mon, 20 May 2024 15:34:28 GMT, Oussama Louati <duke at openjdk.org> wrote:

>> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, MethodType, and CallSite constants.
>> It currently uses ad-hoc code to process class files and intends to migrate to ASM; but since we have the Classfile API, we can migrate to Classfile API instead.
>
> Oussama Louati has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update test/jdk/java/lang/invoke/indify/Indify.java
>   
>   Co-authored-by: Glavo <zjx001202 at gmail.com>

test/jdk/java/lang/invoke/indify/Indify.java line 1362:

> 1360:                 List<LoadableConstantEntry> bsmArgs = new ArrayList<>();
> 1361:                 for (LoadableConstantEntry lce : classModel.constantPool().bootstrapMethodEntry(i).arguments()){
> 1362:                     bsmArgs.add(lce);

Suggestion:

                List<LoadableConstantEntry> bsmArgs = new ArrayList<>(classModel.constantPool().bootstrapMethodEntry(i).arguments());

Also remove the closing brace in next line.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18841#discussion_r1606944693


More information about the core-libs-dev mailing list