/[classpath]/classpath/java/net/URL.java
ViewVC logotype

Diff of /classpath/java/net/URL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by mark, Sun Jul 4 12:02:40 2004 UTC revision 1.33 by mark, Sun Jul 4 12:23:56 2004 UTC
# Line 703  public final class URL implements Serial Line 703  public final class URL implements Serial
703    protected void set(String protocol, String host, int port, String file,    protected void set(String protocol, String host, int port, String file,
704                       String ref)                       String ref)
705    {    {
706      URLStreamHandler protocolHandler = getURLStreamHandler(protocol);      URLStreamHandler protocolHandler = null;
707        protocol = protocol.toLowerCase();
708        if (! this.protocol.equals(protocol))
709          protocolHandler = getURLStreamHandler(protocol);
710            
711      // It is an hidden feature of the JDK. If the protocol does not exist,      // It is an hidden feature of the JDK. If the protocol does not exist,
712      // we keep the previously initialized protocol.      // we keep the previously initialized protocol.
713      if (protocolHandler != null)      if (protocolHandler != null)
714        {        {
715          this.ph = protocolHandler;          this.ph = protocolHandler;
716          this.protocol = protocol.toLowerCase();          this.protocol = protocol;
717        }        }
718      this.authority = "";      this.authority = "";
719      this.port = port;      this.port = port;
# Line 746  public final class URL implements Serial Line 749  public final class URL implements Serial
749    protected void set(String protocol, String host, int port, String authority,    protected void set(String protocol, String host, int port, String authority,
750                       String userInfo, String path, String query, String ref)                       String userInfo, String path, String query, String ref)
751    {    {
752      URLStreamHandler protocolHandler = getURLStreamHandler(protocol);      URLStreamHandler protocolHandler = null;
753        protocol = protocol.toLowerCase();
754        if (! this.protocol.equals(protocol))
755          protocolHandler = getURLStreamHandler(protocol);
756            
757      // It is an hidden feature of the JDK. If the protocol does not exist,      // It is an hidden feature of the JDK. If the protocol does not exist,
758      // we keep the previously initialized protocol.      // we keep the previously initialized protocol.
759      if (protocolHandler != null)      if (protocolHandler != null)
760        {        {
761          this.ph = protocolHandler;          this.ph = protocolHandler;
762          this.protocol = protocol.toLowerCase();          this.protocol = protocol;
763        }        }
764      this.host = host;      this.host = host;
765      this.userInfo = userInfo;      this.userInfo = userInfo;

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26