<i18n dev> RFR: 8315444: Convert test/jdk/tools to Classfile API [v2]

Adam Sotona asotona at openjdk.org
Wed Sep 6 09:11:45 UTC 2023


On Tue, 5 Sep 2023 23:33:05 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Qing Xiao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   migrate test/jdk/java/time/nontestng/java/time/chrono/HijrahConfigTest.java use Classfile API
>
> test/jdk/tools/lib/tests/JImageValidator.java line 225:
> 
>> 223: 
>> 224:     public static void readClass(byte[] clazz) throws IOException {
>> 225:         Classfile.of().parse(clazz);
> 
> Notice that the old API might throw different exceptions compared to the new one; the new one is lazy, e.g. if there's broken interface entry but the interfaces are not queried, no exception is thrown.

You are right, however original `ClassFile::read` also does not represent much of a validation.
Stronger verification can by applied by asserting no verify errors returned from `ClassModel::verify`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15529#discussion_r1316981223


More information about the i18n-dev mailing list