[kaffe] java.net.URI.toURL patch

Robin Green greenrd at greenrd.org
Wed Oct 22 08:13:03 PDT 2003


Attached is a tiny patch to implement URI.toURL. Where is the best
place to send such tiny patches?
-- 
Robin
-------------- next part --------------
--- kaffe-1.1.2/libraries/javalib/java/net/URI.java	2003-05-07 07:13:08.000000000 +0100
+++ kaffe-1.1.2/libraries/javalib/java/net/URI.java.new	2003-10-20 08:49:01.000000000 +0100
@@ -456,7 +456,8 @@
   public URL toURL ()
     throws IllegalArgumentException, MalformedURLException
   {
-    return null;
+    if (!isAbsolute ()) throw new IllegalArgumentException ("URL is not absolute");
+    return new URL (toString ());
   }
 
   /**


More information about the kaffe mailing list