This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
patch for java/net/URLStreamHandler.java
- To: java-patches at gcc dot gnu dot org
- Subject: patch for java/net/URLStreamHandler.java
- From: Per Bothner <per at bothner dot com>
- Date: 19 Mar 2001 15:41:19 -0800
I came across this bug while trying to compile Kawa.
I'm checking this into the trunk and the gcc3 branch.
(I'm not sure why we're "canonicalizing" URLs - maybe Sun does it.)
2001-03-19 Per Bothner <per@bothner.com>
* java/net/URLStreamHandler.java (parseURL): Fix bug which would
"canonicalize" "../../xxx" to "/xxx".
Index: URLStreamHandler.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URLStreamHandler.java,v
retrieving revision 1.5
diff -u -r1.5 URLStreamHandler.java
--- URLStreamHandler.java 2000/03/07 19:55:27 1.5
+++ URLStreamHandler.java 2001/03/19 23:18:28
@@ -111,7 +111,7 @@
if (previous >= 0)
file = file.substring(0, previous) + file.substring(index + 3);
else
- file = file.substring(index + 3);
+ break;
}
u.set(u.getProtocol(), host, port, file, u.getRef());
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/