This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for java/net/URLStreamHandler.java


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]