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

Daniel Fuchs dfuchs at openjdk.org
Tue Mar 25 21:09:21 UTC 2025


On Tue, 25 Mar 2025 19:59:43 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

>> Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename 'separator' to 'separatorIndex', 'nameIdx' to 'nameIndex'
>
> 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.

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

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


More information about the net-dev mailing list