Patch: convert protocol to lower case in constructor

Anthony Green green@redhat.com
Sat Jul 3 14:12:00 GMT 2004


Here's the first of a few patches I used while getting Eclipse to 
start up.  Ok for HEAD (and Classpath)?

AG


2004-07-03  Anthony Green  <green@redhat.com>

	* java/net/URL.java (URL): Convert protocol to lower case before
	doing anything, so we getURLStreamHandler() with the proper value.


Index: java/net/URL.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URL.java,v
retrieving revision 1.37
diff -c -u -p -r1.37 URL.java
--- java/net/URL.java	3 May 2004 20:23:26 -0000	1.37
+++ java/net/URL.java	3 Jul 2004 14:08:17 -0000
@@ -262,7 +262,8 @@ public final class URL implements Serial
   {
     if (protocol == null)
       throw new MalformedURLException("null protocol");
-    this.protocol = protocol.toLowerCase();
+    protocol = protocol.toLowerCase();
+    this.protocol = protocol;
 
     if (ph != null)
       {


-- 
Anthony Green <green@redhat.com>
Red Hat, Inc.



More information about the Java-patches mailing list