aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/java/net/URL.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/net/URL.java')
-rw-r--r--libjava/classpath/java/net/URL.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/libjava/classpath/java/net/URL.java b/libjava/classpath/java/net/URL.java
index 967cc80..ed7decc 100644
--- a/libjava/classpath/java/net/URL.java
+++ b/libjava/classpath/java/net/URL.java
@@ -482,7 +482,17 @@ public final class URL implements Serializable
}
catch (URLParseError e)
{
- throw new MalformedURLException(e.getMessage());
+ MalformedURLException mue = new MalformedURLException(e.getMessage());
+ mue.initCause(e);
+ throw mue;
+ }
+ catch (RuntimeException e)
+ {
+ // This isn't documented, but the JDK also catches
+ // RuntimeExceptions here.
+ MalformedURLException mue = new MalformedURLException(e.getMessage());
+ mue.initCause(e);
+ throw mue;
}
if (hashAt >= 0)
@@ -535,8 +545,7 @@ public final class URL implements Serializable
*/
public Object getContent(Class[] classes) throws IOException
{
- // FIXME: implement this
- return getContent();
+ return openConnection().getContent(classes);
}
/**