tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1421327 - in /tomcat/sandbox: storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
Date Thu, 13 Dec 2012 15:04:33 GMT
Author: remm
Date: Thu Dec 13 15:04:32 2012
New Revision: 1421327

URL: http://svn.apache.org/viewvc?rev=1421327&view=rev
Log:
Try out more accurate comparison with the connector bean and the protocol handler (the default
constructor does not create the same protocol handler).

Modified:
    tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
    tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java

Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421327&r1=1421326&r2=1421327&view=diff
==============================================================================
--- tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
(original)
+++ tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
Thu Dec 13 15:04:32 2012
@@ -87,11 +87,13 @@ public class ConnectorStoreAppender exte
             writer.print("\"");
         }
 
-        List propertyKeys = getPropertyKeys((Connector) bean);
+        Connector connector = (Connector) bean;
+        String protocol = connector.getProtocol();
+        List propertyKeys = getPropertyKeys(connector);
         // Create blank instance
-        Object bean2 = defaultInstance(bean);
-        for (Iterator propertyIterator = propertyKeys.iterator(); propertyIterator
-                .hasNext();) {
+        Object bean2 = new Connector(protocol);//defaultInstance(bean);
+        Iterator propertyIterator = propertyKeys.iterator();
+        while (propertyIterator.hasNext()) {
             String key = (String) propertyIterator.next();
             Object value = (Object) IntrospectionUtils.getProperty(bean, key);
 
@@ -113,10 +115,10 @@ public class ConnectorStoreAppender exte
                 // The property has its default value
                 continue;
             }
-            if (isPrintValue(bean, bean2, key, desc))
+            if (isPrintValue(bean, bean2, key, desc)) {
                 printValue(writer, indent, key, value);
+            }
         }
-        String protocol = ((Connector) bean).getProtocol();
         if (protocol != null && !"HTTP/1.1".equals(protocol))
             super.printValue(writer, indent, "protocol", protocol);
 

Modified: tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java?rev=1421327&r1=1421326&r2=1421327&view=diff
==============================================================================
--- tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
(original)
+++ tomcat/sandbox/storeconfig7/trunk/src/main/java/org/apache/catalina/storeconfig/ConnectorStoreAppender.java
Thu Dec 13 15:04:32 2012
@@ -87,9 +87,11 @@ public class ConnectorStoreAppender exte
             writer.print("\"");
         }
 
-        List propertyKeys = getPropertyKeys((Connector) bean);
+        Connector connector = (Connector) bean;
+        String protocol = connector.getProtocol();
+        List propertyKeys = getPropertyKeys(connector);
         // Create blank instance
-        Object bean2 = defaultInstance(bean);
+        Object bean2 = new Connector(protocol);//defaultInstance(bean);
         Iterator propertyIterator = propertyKeys.iterator();
         while (propertyIterator.hasNext()) {
             String key = (String) propertyIterator.next();
@@ -117,7 +119,6 @@ public class ConnectorStoreAppender exte
                 printValue(writer, indent, key, value);
             }
         }
-        String protocol = ((Connector) bean).getProtocol();
         if (protocol != null && !"HTTP/1.1".equals(protocol))
             super.printValue(writer, indent, "protocol", protocol);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message