RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

Eirik Bjørsnøs eirbjo at openjdk.org
Fri Apr 25 10:01:05 UTC 2025


On Fri, 25 Apr 2025 09:44:34 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> I wonder if we need to add a comment in OpenStream that "bad" UNC paths are tested in NonLocalFtpFallback.

We could. But there is technincally no such thing as a "bad" UNC path though. If File::exists fails, then it isn't considered a UNC path, so would fall back to FtpURLConnection. But so would the Unix implementation of `Handler::openConnection`, which has no concept of UNC. (Notice how the test I added to `NonLocalFtpFallback` is not specific to Windows)

So this testing is verifying network exceptions happing from FtpURLConnection. It isn't really UNC nor Windows-specific. With this in mind, the existing `OpenStream::testUnc` seems somewhat suspicious, so I'm worried a comment would be just as confusing, at least if mentioning UNC.

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

PR Comment: https://git.openjdk.org/jdk/pull/24657#issuecomment-2829950737


More information about the net-dev mailing list