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

Doc for java.net.URLStreamHandler is silent about the protocol name changing

XMLWordPrintable

    • sparc
    • solaris_2.6



      Name: dfC67450 Date: 09/03/99




      The method setURL(URL, String, String, int, String, String, String, String, String)
      of URLStreamHandler does not allow to change the protocol name.
      Its source:


          protected void setURL(URL u, String protocol, String host, int port,
      String authority, String userInfo, String path,
                                   String query, String ref) {
      if (this != u.handler) {
      throw new SecurityException("handler for url different from " +
      "this handler");
      }
      // ensure that no one can reset the protocol on a given URL.
              u.set(u.getProtocol(), host, port, authority, userInfo, path, query, ref);
          }

      But doc for both URLStreamHandler and URL is silent about this feature.

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

            shommel Scott Hommel (Inactive)
            fdasunw Fda Fda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: