RFR: 8263968: CDS: java/lang/ModuleLayer.EMPTY_LAYER should be singleton [v2]

Aleksei Voitylov avoitylov at openjdk.java.net
Tue Mar 23 08:06:43 UTC 2021


On Tue, 23 Mar 2021 06:47:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Aleksei Voitylov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix style
>
> src/java.base/share/classes/java/lang/ModuleLayer.java line 156:
> 
>> 154: 
>> 155:     static {
>> 156:         // Initialize EMPTY_LAYER from the archive.
> 
> Style wide you can drop L154 and L156 and the comment on EMPTY_LAYER will cover its initialization too.
> 
> Otherwise looks okay but the more archiving we add does make it harder to change this code.

Fixed according to your comments. Thanks! 

I was surprised to find CDS specific code in the java layer as well, but it's not the design choice I believe I can make with this bug fix.

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

PR: https://git.openjdk.java.net/jdk/pull/3131


More information about the hotspot-runtime-dev mailing list