Revision: 7738
Author: victormote
Date: 2006-06-24 09:25:17 -0700 (Sat, 24 Jun 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7738&view=rev
Log Message:
-----------
Revert to throwing an exception, but make it an unchecked exception, as per Vincent Hennebert's suggestion.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-06-24 16:11:37 UTC (rev 7737)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/FOrayURLStreamHandlerFactory.java 2006-06-24 16:25:17 UTC (rev 7738)
@@ -87,10 +87,12 @@
public void registerProtocol(String protocol, URLStreamHandler handler)
throws IOException {
if (protocol == null) {
- return;
+ throw new IllegalArgumentException("Cannot register a null "
+ + "protocol.");
}
if (handler == null) {
- return;
+ throw new IllegalArgumentException("Cannot register a null "
+ + "URLStreamHandler.");
}
if (this.protocols.containsKey(protocol)) {
throw new IOException("Protocol \n" + protocol
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|