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

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • sparc
    • solaris_2.6



      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



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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: