classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Re: Absolute URL parsing bug


From: Andrew Haley
Subject: [cp-patches] Re: Absolute URL parsing bug
Date: Mon, 4 Jul 2005 18:07:19 +0100

Thanks to Per's reasoning I have a better patch.  

When creating a URL: if the spec is absolute and a context URL is
supplied, we should inherit the host:port part of the context if its
protocol the same as that of the spec, but we should not inherit its
file path.

Andrew.



2005-07-04  Andrew Haley  <address@hidden>

        * java/net/URL.java (URL): Don't inherit the path component when
        the scheme component of the context matches the scheme component
        of the spec.
 
Index: URL.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URL.java,v
retrieving revision 1.51
diff -p -2 -c -r1.51 URL.java
*** URL.java    27 Apr 2005 20:10:07 -0000      1.51
--- URL.java    4 Jul 2005 16:45:42 -0000
*************** public final class URL implements Serial
*** 409,413 ****
            host = context.host;
            port = context.port;
-           file = context.file;
              userInfo = context.userInfo;
            if (file == null || file.length() == 0)
--- 409,412 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]