On Thu, 12 Mar 2026 11:38:53 GMT, David Beaumont <[email protected]> wrote:

>> src/java.base/share/classes/sun/net/www/protocol/jrt/JavaRuntimeURLConnection.java
>>  line 129:
>> 
>>> 127:     // Perform percent decoding of the resource name/path from the URL.
>>> 128:     private static String percentDecode(String path) throws 
>>> MalformedURLException {
>>> 129:         if (path.indexOf('%') == -1) {
>> 
>> `ParseUtil.decode(...)` which is what gets called immediately in the next 
>> line already has this check, at entry, in its implementation. So I think 
>> this additional check at call sites, like here, isn't necessary.
>
> It was deliberately pulled out here because of JDK-8359949 for which I want 
> to add proper decoding at some point (that's what the comment on line 133 is 
> for).
> 
> I had hoped/expected that bug would have been fixed long before this 
> migration of the code.
> So I'd rather keep it here so additional work at line 133 will be guarded 
> properly.

If you are keeping it then drop the "overwhelmingly" word, saying it is common 
case is okay,

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r2930600507

Reply via email to