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

URL(URL context, String spec) hangs with specific input.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      sparc
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      URL(URL context, String spec) hangs with the following input with build 71. It shows MalformedURLException with build70 and previous builds.

      How to reproduce:

       URL contexturl1 = new URL("file:./");
       System.out.println("ToString context url : " + contexturl1.toString());
       URL u4 = new URL(contexturl1, "../images/foo.gif");

       System.out.println("ToString u4 : " + u4.toString());


        With build71 its not coming out of "URL u4 = new URL(contexturl1, "../images/foo.gif"); " line.
       

      Output with build71:

      ToString context url : file:./


      Output with build 70:

      ToString context url : file:./
      java.net.MalformedURLException: context contains relative path: file:./
              at java.net.URL.<init>(URL.java:484)
              at java.net.URL.<init>(URL.java:390)
              at TestURL1.main(TestURL1.java:113)


        Attachments

          Activity

            People

            • Assignee:
              ywangsunw Yingxian Wang (Inactive)
              Reporter:
              vakellasunw Venkata Akella (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: