geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r234314 - /geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
Date Sun, 21 Aug 2005 18:48:40 GMT
Author: jgenender
Date: Sun Aug 21 11:48:37 2005
New Revision: 234314

URL: http://svn.apache.org/viewcvs?rev=234314&view=rev
Log:
Ensure host and port attributes are not null

Modified:
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java?rev=234314&r1=234313&r2=234314&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
Sun Aug 21 11:48:37 2005
@@ -49,6 +49,17 @@
         Map initParams = new HashMap();
 
         validateProtocol(protocol);
+        
+        //Default the host to listen on all address is one was not specified
+        if (host == null){
+            host = "0.0.0.0";
+        }
+        
+        //Must have a port
+        if (port == 0){
+            throw new IllegalArgumentException("Must declare a port.");
+        }
+
         initParams.put("address", host);
         initParams.put("port", Integer.toString(port));
         initializeParams(protocol, initParams);



Mime
View raw message