RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time [v3]
Alan Bateman
alanb at openjdk.org
Fri Sep 27 11:15:37 UTC 2024
On Mon, 23 Sep 2024 05:57:09 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/module/ModuleReferences.java line 105:
>>
>>> 103: public byte[] generate(String algorithm) {
>>> 104: return ModuleHashes.computeHash(supplier, algorithm);
>>> 105: }
>>
>> Why is JarModuleReader changed to use a file string, is this because of an environment dependency when using a Path?
>
> It is to avoid the following warnings during dump time:
>
> [1.607s][warning][cds,heap ] Archive heap points to a static field that may be reinitialized at runtime:
> [1.607s][warning][cds,heap ] Field: java/util/zip/ZipFile$Source::builtInFS
> [1.607s][warning][cds,heap ] Value: sun.nio.fs.LinuxFileSystem
> ...
> [1.607s][warning][cds,heap ] Archive heap points to a static field that may be reinitialized at runtime:
> [1.607s][warning][cds,heap ] Field: sun/nio/fs/DefaultFileSystemProvider::INSTANCE
> [1.607s][warning][cds,heap ] Value: sun.nio.fs.LinuxFileSystemProvider
Thanks. At one point we will likely have to re-visit this we have prototype changes that re-implement ZipFile and java.io to use the newer APIs.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21048#discussion_r1778454364
More information about the core-libs-dev
mailing list