mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
re PR libgcj/4383 (file: protocol not supported in URLConnection?)
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. From-SVN: r45898
This commit is contained in:
committed by
Bryce McKinlay
parent
fa82903832
commit
218e1e912d
@@ -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 '#'
|
||||
|
||||
Reference in New Issue
Block a user