RFR: 8359808: JavaRuntimeURLConnection should only connect to non-directory resources [v3]

David Beaumont duke at openjdk.org
Mon Jun 23 11:03:32 UTC 2025


On Sat, 21 Jun 2025 08:47:14 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Feedback changes and renaming field to match nomenclature of JEP 220.
>
> src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java line 60:
> 
>> 58: 
>> 59:     // The resource node (when connected).
>> 60:     private volatile Node resourceNode;
> 
> Did you mean to keep this as a volatile field? The only access right seems to be in the synchronized getResourceNode method but maybe it was accessed without the lock in a previous version?

Yeah, I can't see any reason to keep this, but didn't want to risk touching it.
If you are happy to remove it, I will be happy to do so (I don't like unexplained/uncommented things like this).

> test/jdk/sun/net/www/protocol/jrt/Basic.java line 64:
> 
>> 62:                 {"jrt:/java.base/", false},
>> 63:                 // Cannot escape anything in the module name.
>> 64:                 {"jrt:/java%2Ebase/java/lang/Object.class", false},
> 
> Can you add "jrt:/" to the list?

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25871#discussion_r2161329951
PR Review Comment: https://git.openjdk.org/jdk/pull/25871#discussion_r2161330323


More information about the net-dev mailing list