RFR: 8352858: Make java.net.JarURLConnection fields final [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Wed Mar 26 06:07:13 UTC 2025


On Tue, 25 Mar 2025 21:06:29 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> src/java.base/share/classes/java/net/JarURLConnection.java line 165:
>> 
>>> 163:         int separatorIndex = spec.indexOf("!/");
>>> 164: 
>>> 165:         // REMIND: we don't handle nested JAR URLs
>> 
>> Just noticed that this comment seems misplaced and is confusing.
>> 
>> The check just asserts that the URL contains the separator. I don't see how this is related to nesting at all. If the URL was nested, we would have more than one separator, right?
>> 
>> If we agree this comment is misplaced, perhaps we should just remove it?
>> 
>> Or perhaps the REMIND here is a type of TODO?
>
> I believe this is just a reminder that there should just be one single "!/" because nested "!/" in URL are not supported.

Alright, however mysterious it seems to carry some value. Let's keep it around.

Thanks for your reviews!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24218#discussion_r2013446602


More information about the net-dev mailing list