geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r470501 - /geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
Date Thu, 02 Nov 2006 20:12:47 GMT
Author: vamsic007
Date: Thu Nov  2 12:12:46 2006
New Revision: 470501

URL: http://svn.apache.org/viewvc?view=rev&rev=470501
Log:
GERONIMO-2348 Tomcat ConnectorGBean does not handle attribute values properly

Modified:
    geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java

Modified: geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java?view=diff&rev=470501&r1=470500&r2=470501
==============================================================================
--- geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
(original)
+++ geronimo/server/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
Thu Nov  2 12:12:46 2006
@@ -340,8 +340,7 @@
      * configured for SSL.
      */
     public int getRedirectPort() {
-        Object value = connector.getAttribute("redirectPort");
-        return value == null ? 0 : Integer.parseInt(value.toString());
+        return connector.getRedirectPort();
     }
 
     /**
@@ -352,7 +351,7 @@
      * be used as they all fail equally well.  :)
      */
     public void setRedirectPort(int port) {
-        connector.setAttribute("redirectPort", new Integer(port));
+        connector.setRedirectPort(port);
     }
 
     public int getMinSpareThreads() {
@@ -383,12 +382,11 @@
     }
 
     public boolean isHostLookupEnabled() {
-        Object value = connector.getAttribute("enableLookups");
-        return value == null ? true : new Boolean(value.toString()).booleanValue();
+        return connector.getEnableLookups();
     }
 
     public void setHostLookupEnabled(boolean enabled) {
-        connector.setAttribute("enableLookups", new Boolean(enabled));
+        connector.setEnableLookups(enabled);
     }
 
     public int getConnectionTimeoutMillis() {
@@ -419,12 +417,12 @@
     }
 
     public int getMaxSavePostSize() {
-        Object value = connector.getAttribute("maxSavePostSize");
-        return value == null ? 4096 : Integer.parseInt(value.toString());
+        int value = connector.getMaxSavePostSize();
+        return value == 0 ? 4096 : value;
     }
 
     public void setMaxSavePostSize(int kbytes) {
-        connector.setAttribute("maxSavePostSize", new Integer(kbytes));
+        connector.setMaxSavePostSize(kbytes);
     }
 
     public int getMaxKeepAliveRequests() {
@@ -446,12 +444,11 @@
     }
 
     public boolean getUseBodyEncodingForURI() {
-        Object value = connector.getAttribute("useBodyEncodingForURI");
-        return value == null ? false : Boolean.getBoolean(value.toString());
+        return connector.getUseBodyEncodingForURI();
     }
 
     public void setUseBodyEncodingForURI(boolean enabled) {
-        connector.setAttribute("useBodyEncodingForURI", new Boolean(enabled));
+        connector.setUseBodyEncodingForURI(enabled);
     }
 
 



Mime
View raw message