Author: gttersen
Date: 2007-05-23 13:15:30 +0200 (Wed, 23 May 2007)
New Revision: 5148

Modified:
   
trunk/httpclient-api/src/main/java/no/schibstedsok/searchportal/http/HTTPClient.java
Log:
Now throws exception if port is set to 0 again

Modified: 
trunk/httpclient-api/src/main/java/no/schibstedsok/searchportal/http/HTTPClient.java
===================================================================
--- 
trunk/httpclient-api/src/main/java/no/schibstedsok/searchportal/http/HTTPClient.java
        2007-05-23 11:04:25 UTC (rev 5147)
+++ 
trunk/httpclient-api/src/main/java/no/schibstedsok/searchportal/http/HTTPClient.java
        2007-05-23 11:15:30 UTC (rev 5148)
@@ -89,6 +89,10 @@
 
     private URL getURL(final String path) throws MalformedURLException {
 
+        if (port == 0) {
+            throw new MalformedURLException("Null port");
+        }
+
         final boolean hasProtocol = host.startsWith("http://";) || 
host.startsWith("https://";)
                 || host.startsWith("ftp://";) || host.startsWith("file://");
 

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to