RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

Timofei Pushkin tpushkin at openjdk.org
Tue Apr 8 11:36:13 UTC 2025


On Mon, 7 Apr 2025 16:00:27 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Don't use URLClassPath
>
> src/hotspot/share/cds/classListParser.cpp line 534:
> 
>> 532:   GrowableArray<InstanceKlass*> specified_interfaces = get_specified_interfaces();
>> 533: 
>> 534:   const char* source_path = ClassLoader::uri_to_path(_source);
> 
> Is `ClassLoader::uri_to_path` necessary? I think `_source` is already a file path.

`_source` is a URL with `file:`removed from the beginning of it, so yes, this is necessary.

For example, if a class resides in a directory called "my dir" its `_source` will be "my%20dir" — `uri_to_path` will replace "%20" with " ".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24223#discussion_r2032994904


More information about the hotspot-runtime-dev mailing list