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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      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

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: