Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353278

Consolidate local file URL checks in jar: and file: URL schemes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • b18

      The following 'local file' test exists in multiple places in the JDK and can be consolidated in a shared utility method in sun.net.www.ParseUtil:

      String host = url.getHost();
      if (host == null || host.isEmpty() || host.equals("~") ||
              host.equalsIgnoreCase("localhost"))
          return true;

      Also, we should refer to RFC 8089, Section 2 here for the definition of "local file" in a file: URL

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

              Created:
              Updated:
              Resolved: