RFR: 8331467: ImageReaderFactory can cause a ClassNotFoundException if the default FileSystemProvider is not the system-default provider [v2]
liyazzi
duke at openjdk.org
Sat Dec 7 13:48:37 UTC 2024
On Sat, 7 Dec 2024 09:16:58 GMT, liyazzi <duke at openjdk.org> wrote:
>> For two cases:
>>
>> 1. When the ImageReaderFactory was loaded by local jdk,that means the ImageReaderFactory was loaded by boot class loader,then init the `Path BOOT_MODULES_JIMAGE` by using `sun.nio.fs.DefaultFileSystemProvider` which is obtained through reflection,due to it is in jdk internal.
>> 2. When loaded by a target jdk, such as jdk8 runtime, then use the Java 8 compatible APIs: `FileSystems.getDefault()` to init the `BOOT_MODULES_JIMAGE` field.
>> Then we can avoid the circular dependencies in class loading caused by loading the defaultSystemProvider.
>
> liyazzi has updated the pull request incrementally with one additional commit since the last revision:
>
> add test.jdk value log
All of the `test (hs/tier1 compiler not-xcomp)` failed. Does it matter?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22628#issuecomment-2525133552
More information about the core-libs-dev
mailing list