RFR: 8308753: Class-File API transition to Preview [v3]

Adam Sotona asotona at openjdk.org
Tue Oct 3 12:47:48 UTC 2023


On Mon, 2 Oct 2023 13:50:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java line 67:
>> 
>>> 65: 
>>> 66:     /**
>>> 67:      * {@return for an {@code invokeinterface}, the {@code count} value, as defined in {@jvms 6.5}}
>> 
>> Suggestion:
>> 
>>      * {@return the {@code count} value of an {@code invokeinterface} instruction, as defined in {@jvms 6.5}}
>
> What does this return for something that is not `invokeinterface` ? Do we infer the count from the descriptor? Or do we return -1 ? This should probably be reflected in the javadoc.

Return value for other invoke instructions was inconsistent across implementations.
I've unified them to return 0 and mentioned it in the javadoc.
Thanks for pointing it out, good catch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15706#discussion_r1344039936


More information about the javadoc-dev mailing list