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

JDK regression: java.net.URL.URL(URL context, String spec)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.4.0
    • core-libs
    • sparc
    • solaris_2.6

    Description



      Name: dfR10049 Date: 08/21/2000




      java.net.URL ctor URL(URL context, String spec) creates different url
      in jdk1.3 and jdk1.4.

      See Test.java bellow:

      ---------------------------------
      import java.net.*;

      public class Test {

          public static void main (String args[]){
              try {
                  URL url = new URL(new URL("http://host/file?x=1&y=0"), "#ref");
                  System.out.println(url.toString());
              } catch (Exception e) {
                  System.out.println(" " + e);
              }
          }
      }
      ---------------------------------
      Output from jdk1.3:
        http://host/file?x=1&y=0#ref

      Output from jdk1.4:
        http://host/file#ref



      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              ywangsunw Yingxian Wang (Inactive)
              fdasunw Fda Fda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: