RFD: Use of ~ (tilde) when considering local and non-local file URLs
Eirik Bjørsnøs
eirbjo at gmail.com
Wed Mar 26 13:57:26 UTC 2025
On Wed, Mar 26, 2025 at 11:13 AM Eirik Bjørsnøs <eirbjo at gmail.com> wrote:
> In JarFileFactory::urlFor however, the logic is slightly different in that
> the comparison with ~ (tilde) is missing:
>
> String host = url.getHost();
> if (host != null && !host.isEmpty() &&
> !host.equalsIgnoreCase("localhost")) {
>
>
Some context:
This comparison in JarFileFactory::urlFor is only performed on Windows,
which could indicate Windows wants special treatment for "~".
However, the Windows version of Handler::openConnection does indeed
consider "~". So at the very least the current situation is inconsistent.
Eirik,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/net-dev/attachments/20250326/de1d9101/attachment.htm>
More information about the net-dev
mailing list