[kaffe] java.net.URI.toURL patch
Robin Green
greenrd@greenrd.org
Wed Oct 22 08:13:03 2003
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Attached is a tiny patch to implement URI.toURL. Where is the best
place to send such tiny patches?
--
Robin
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kaffe-uri.patch"
--- 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 ());
}
/**
--2oS5YaxWCcQjTEyO--