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

Constructing a file URL with a tag is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_95

      Description



      Name: dbT83986 Date: 02/25/99


      import java.net.*;
      public class Foo {
      public static void main(java.lang.String[] args) {

            try {
             URL u = new URL("file:/temp/readme.html");
             System.out.println("url " + u);
             u = new URL(u, "#link");
             System.out.println("url " + u);
            } catch (MalformedURLException m) {
            }
      }
      }

      On JDK 1.2 the output is:
      url file:/temp/readme.html
      url file:/temp/#link

      with JDK 1.1 the output is:
      url file:/temp/readme.html
      url file:/temp/readme.html#link
      (Review ID: 47952)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dblairsunw Dave Blair (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: