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

url: file:///D|/Projects/tmp/test.html: urlConnection.getInputStream() broken.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.1
    • core-libs
    • None
    • beta2
    • x86
    • generic

      According to the URL spec, and common practice, Windows drive names, such as "D:" can be replaced in URLs with "D|". However, this doesn't work in JDK 1.3.1.

      Attached is a simple testcase that illustrates this problem. Please modify urlStr so it points to a local HTML file.

      When compiled and run like this:

      java -classpath . FileTest

      I get this exception:

      file:///D|/Projects/tmp/fileurl/test.html
      Exception: java.io.FileNotFoundException: \D|\Projects\tmp\fileurl\test.html (The filename, directory name, or volume label syntax is incorrect)

      Substituting the appropriate file: url of course.

            ywangsunw Yingxian Wang (Inactive)
            ejburns Ed Burns (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: