RFR: 8291640: java/beans/XMLDecoder/8028054/Task.java should use the 3-arg Class.forName

Ao Qi aoqi at openjdk.org
Fri Aug 5 07:07:07 UTC 2022


On Wed, 3 Aug 2022 05:59:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>>> One other comment on this is that the proposed change should mean that the tests no longer need to run with --enable-preview.
>> 
>> You've lost me all over again.
>> Why did these two tests need that in the first place and why would they no longer need it ?
>> 
>> My best guess is that it was added so that the tests deliberately provoked using continuations to verify everything worked but that with the change there's no point since it won't load any classes that use them .. ?
>
>> My best guess is that it was added so that the tests deliberately provoked using continuations to verify everything worked but that with the change there's no point since it won't load any classes that use them .. ?
> 
> That's right. These tests triggered the initialization of classes that depend on the VM being started with --enable-preview. With the proposed change here, the classes will be loaded but not initialized so it won't execute code that needs preview features to be enabled.

Thanks, @AlanBateman ! Let's wait and see if @prrace  approves the change.

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

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



More information about the client-libs-dev mailing list