RFR: 8341452: Test runtime/cds/appcds/DumpRuntimeClassesTest.java from JDK-8324259 is failing [v5]

Matias Saavedra Silva matsaave at openjdk.org
Wed Oct 16 17:53:13 UTC 2024


On Wed, 16 Oct 2024 05:29:11 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/cds/cdsProtectionDomain.cpp line 212:
>> 
>>> 210: }
>>> 211: 
>>> 212: oop CDSProtectionDomain::get_shared_jar_url_helper(const char* path, Handle url_h, TRAPS) {
>> 
>> Suggestion:
>> 
>> oop CDSProtectionDomain::get_file_URL(const char* path, Handle url_h, TRAPS) {
>> 
>> It looks odd to have a "helper" method as part of the public API, especially when called directly.
>
> I think both function can use the same name, since they have overloaded parameter types:
> 
> 
> Handle CDSProtectionDomain::get_shared_jar_url(int shared_path_index, TRAPS);
> oop CDSProtectionDomain::get_shared_jar_url(const char* path, Handle url_h, TRAPS);

I think using the same name might be confusing here since they return totally different things. I prefer David's suggestion here since all the method is doing is calling `toFileURL`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21329#discussion_r1803559544


More information about the hotspot-dev mailing list