On Mon, 22 Mar 2021 19:40:19 GMT, Aleksei Voitylov <avoity...@openjdk.org> 
wrote:

> With CDS and G1, test api/java_lang/ModuleLayer/Boot.html fails in JDK 16. 
> 
> After JDK-8253081 with CDS enabled two instances of empty layer appear in the 
> runtime. One comes from default initialization of 
> java/lang/ModuleLayer.EMPTY_LAYER, another one comes from CDS archive and is 
> returned by ModuleLayer.boot().parents().get(0). The fix makes 
> java/lang/ModuleLayer.EMPTY_LAYER a singleton with both CDS on and off, 
> similar to java/lang/module/Configuration.EMPTY_CONFIGURATION.
> 
> Testing: JCK 16, jtreg (including newly added test), pre-submit GitHub 
> actions tests.

This pull request has now been integrated.

Changeset: 133a63b4
Author:    Aleksei Voitylov <avoity...@openjdk.org>
Committer: Claes Redestad <redes...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/133a63b4
Stats:     22 lines in 3 files changed: 19 ins; 0 del; 3 mod

8263968: CDS: java/lang/ModuleLayer.EMPTY_LAYER should be singleton

Reviewed-by: iklam, dholmes, alanb, redestad

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

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

Reply via email to