[kaffe] CVS kaffe (dalibor): Resynced with GNU Classpath

Kaffe CVS cvs-commits at kaffe.org
Fri Jan 2 17:54:02 PST 2004


PatchSet 4262 
Date: 2004/01/03 01:51:04
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath

2004-01-03  Dalibor Topic <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2003-12-25  Guilhem Lavaux <guilhem at kaffe.org>

        * gnu/java/net/protocol/jar/Handler.java
        (parseURL): Throw URLParseError if needed, fix '/' handling.

Members: 
	ChangeLog:1.1849->1.1850 
	libraries/javalib/gnu/java/net/protocol/jar/Handler.java:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1849 kaffe/ChangeLog:1.1850
--- kaffe/ChangeLog:1.1849	Sat Jan  3 00:27:59 2004
+++ kaffe/ChangeLog	Sat Jan  3 01:51:04 2004
@@ -4,6 +4,15 @@
 
 	2003-12-25  Guilhem Lavaux <guilhem at kaffe.org>
 
+        * gnu/java/net/protocol/jar/Handler.java
+        (parseURL): Throw URLParseError if needed, fix '/' handling.
+
+2004-01-03  Dalibor Topic <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
+	2003-12-25  Guilhem Lavaux <guilhem at kaffe.org>
+
         * gnu/java/net/URLParseError.java: New file.
 
 2004-01-02  Mark Wielaard <mark at klomp.org>
Index: kaffe/libraries/javalib/gnu/java/net/protocol/jar/Handler.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/jar/Handler.java:1.3 kaffe/libraries/javalib/gnu/java/net/protocol/jar/Handler.java:1.4
--- kaffe/libraries/javalib/gnu/java/net/protocol/jar/Handler.java:1.3	Tue Dec 23 20:18:55 2003
+++ kaffe/libraries/javalib/gnu/java/net/protocol/jar/Handler.java	Sat Jan  3 01:51:06 2004
@@ -38,12 +38,12 @@
 
 package gnu.java.net.protocol.jar;
 
+import gnu.java.net.URLParseError;
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
-import java.net.MalformedURLException;
-import gnu.java.net.URLParseError;
 
 /**
  * @author Kresten Krab Thorup <krab at gnu.org>
@@ -72,7 +72,7 @@
   }
 
   /**
-   * This method overrides URLStreamHandler's for parsing url of protocol "file"
+   * This method overrides URLStreamHandler's for parsing url of protocol "jar"
    *
    * @param url The URL object in which to store the results
    * @param url_string The String-ized URL to parse
@@ -90,11 +90,13 @@
         && file != "")
       { //has context url
 	url_string = url_string.substring (start, end);
-        if (url_string.startsWith ("/"))
+        if (url_string.startsWith("/"))
           { //url string is an absolute path
             int idx = file.lastIndexOf ("!/");
+	    
 	    if (idx < 0)
-	      throw new URLParseError ("no !/ in spec");
+	      throw new URLParseError("no !/ in spec");
+	    
 	    file = file.substring (0, idx + 1) + url_string;
           }
         else
@@ -128,18 +130,17 @@
     url_string = url_string.substring (start, end);
 
     int jar_stop;
-    if ((jar_stop = url_string.indexOf ("!/")) < 0)
-      throw new URLParseError ("no !/ in spec");
+    if ((jar_stop = url_string.indexOf("!/")) < 0)
+      throw new URLParseError("no !/ in spec");
 
     try
       {
-	new URL (url_string.substring (0, jar_stop));
+	new URL(url_string.substring (0, jar_stop));
       }
     catch (MalformedURLException e)
       {
 	throw new URLParseError("invalid inner URL: " + e.getMessage());
       }
-    
     
     if (!url.getProtocol().equals ("jar") )
       throw new URLParseError("unexpected protocol " + url.getProtocol());




More information about the kaffe mailing list