From b4ac09cddb5a433147b996570258e8732a706a18 Mon Sep 17 00:00:00 2001 From: bryce Date: Sun, 30 Sep 2001 07:52:16 +0000 Subject: PR libgcj/4383 * gnu/gcj/protocol/file/Connection.java (connect): Throw FileNotFoundException if appropriate. * gnu/gcj/protocol/file/Handler.java (openConnection): Throw an IOException if we got a file: url with a hostname. Comment out protocol switch to ftp for now. * java/net/URL.java (URL): Include protocol name in exception message when handler can't be found. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45898 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/net/URL.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libjava/java/net/URL.java') diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index 25291fad892..636e6efc3d8 100644 --- a/libjava/java/net/URL.java +++ b/libjava/java/net/URL.java @@ -76,7 +76,7 @@ public final class URL implements Serializable this.handler = setURLStreamHandler(protocol); if (this.handler == null) - throw new MalformedURLException("Handler for protocol not found"); + throw new MalformedURLException("Protocol handler not found: " + protocol); this.host = host; @@ -175,7 +175,7 @@ public final class URL implements Serializable this.handler = setURLStreamHandler(protocol); if (this.handler == null) - throw new MalformedURLException("Handler for protocol not found"); + throw new MalformedURLException("Protocol handler not found: " + protocol); // JDK 1.2 doc for parseURL specifically states that any '#' ref // is to be excluded by passing the 'limit' as the indexOf the '#' -- cgit v1.2.1