On Sun, 29 Sep 2024 04:49:14 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> Can I please get a review of this change which proposes to keep a single 
> source file for `sun.net.www.protocol.jar.JarFileFactory`?
> 
> As noted in https://bugs.openjdk.org/browse/JDK-8341142, the sole difference 
> between the current two sources files is the presence and usage of an 
> additional internal private `urlFor(URL)` method on Windows OS.
> 
> The commit in this PR moves ("git mv") the Windows file to the 
> `share/classes` and removes ("git rm") the Unix file. After the move, an 
> conditional check is now added in the private `urlFor(URL)` method to have 
> its implementation be applicable only on Windows.
> 
> No new test has been added and existing tier1, tier2 and tier3 tests continue 
> to pass.

Marked as reviewed by dfuchs (Reviewer).

It is atypical for networking code to have conditionnal switches on the 
Platform (we usually rely on conditional compilation instead), but in this 
instance I agree that it should help with maintainability, providing that this 
remains the only difference between windows and other systems.
@AlanBateman do you have any objection here?

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

PR Review: https://git.openjdk.org/jdk/pull/21245#pullrequestreview-2347893263
PR Comment: https://git.openjdk.org/jdk/pull/21245#issuecomment-2393549257

Reply via email to