RFR: 8294982: Implementation of Classfile API [v15]
Adam Sotona
asotona at openjdk.org
Fri Feb 10 11:20:57 UTC 2023
On Thu, 9 Feb 2023 14:11:36 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> AttributeElement.Kind removal (#48)
>
> src/java.base/share/classes/jdk/internal/classfile/constantpool/Utf8Entry.java line 47:
>
>> 45: * @param s the string to compare to
>> 46: */
>> 47: boolean equalsString(String s);
>
> Whatif the provided string contains character that are not representable in Utf8? Should we throw (e.g. `IllegalArgumentException`) ?
I would rather expect `false` value returned, however this case is probably not covered by tests.
> src/java.base/share/classes/jdk/internal/classfile/instruction/CharacterRange.java line 60:
>
>> 58: * viewed as an array of (possibly multi-byte) characters.
>> 59: */
>> 60: int characterRangeStart();
>
> Not sure if this belongs here - e.g. it seems to me that `characterRangeStart` is less useful than the labels. But I'm not super expert on how this code element might be used.
It is character range within the source code, not the bytecode.
-------------
PR: https://git.openjdk.org/jdk/pull/10982
More information about the build-dev
mailing list