Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353440 Disable FTP fallback for non-local file URLs by default
  3. JDK-8354658

Release Note: FTP Fallback for Non-Local File URLs Is Disabled by Default

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      The unspecified, but long-standing fallback to FTP connections for non-local `file` URLs is disabled by default.

      The method `URL::openConnection` called for non-local file URLs of the form `"file://server[/path]"` where `server` is anything but `"localhost"` no longer falls back to FTP and no longer returns an FTP URL Connection.
      A `MalformedURLException` is now thrown by the `URL::openConnection` method instead in such cases.

      Code expecting the `URL::openConnection` to succeed, but expecting a delayed exception to be raised when actually using the connection, such as catching an `UnknownHostException` while reading streams, may need to be updated to handle the immediate rejection via `MalformedURLException` instead.

      The legacy FTP fallback behavior can be reenabled by setting the system property `-Djdk.net.file.ftpfallback=true` on the java command line. Support for resolving non-local, existing UNC paths on Windows is not affected by this change.

            eirbjo Eirik Bjørsnøs
            eirbjo Eirik Bjørsnøs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: