[kaffe] CVS kaffe (robilad): fix for Apache Axis: treat empty string the same as null for proxyHost & proxyPo

Kaffe CVS cvs-commits at kaffe.org
Mon Dec 6 00:43:10 PST 2004


PatchSet 5545 
Date: 2004/12/06 08:27:42
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fix for Apache Axis: treat empty string the same as null for proxyHost & proxyPort

2004-12-05  Davanum Srinivas  <davanum at gmail.com>

        * libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:
        Treat empty string as the same as null string for both proxyHost
        and proxyPort.

Members: 
	ChangeLog:1.3091->1.3092 
	libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3091 kaffe/ChangeLog:1.3092
--- kaffe/ChangeLog:1.3091	Mon Dec  6 00:15:30 2004
+++ kaffe/ChangeLog	Mon Dec  6 08:27:42 2004
@@ -1,3 +1,9 @@
+2004-12-05  Davanum Srinivas  <davanum at gmail.com>
+
+	* libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:
+	Treat empty string as the same as null string for both proxyHost 
+	and proxyPort.
+
 2004-12-05  Mark Wielaard  <mark at klomp.org>
 
 	* libraries/javalib/java/lang/VMSecurityManager.java
Index: kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java
diff -u kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.1 kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.2
--- kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java:1.1	Fri Dec  3 17:44:37 2004
+++ kaffe/libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java	Mon Dec  6 08:27:45 2004
@@ -97,10 +97,14 @@
     public Object run()
     {
       proxyHostname = System.getProperty("http.proxyHost");
-      if (proxyHostname != null)
+      if (proxyHostname != null && proxyHostname.length() > 0)
         {
           String port = System.getProperty("http.proxyPort");
-          proxyPort = (port != null) ? Integer.parseInt (port) : -1;
+          proxyPort = (port != null && port.length() > 0) ? Integer.parseInt (port) : -1;
+        }
+      else
+        {
+            proxyHostname = null;
         }
       return null;
     }




More information about the kaffe mailing list