activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r652437 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: network/DemandForwardingBridgeSupport.java util/IntrospectionSupport.java
Date Thu, 01 May 2008 06:10:08 GMT
Author: rajdavies
Date: Wed Apr 30 23:10:08 2008
New Revision: 652437

URL: http://svn.apache.org/viewvc?rev=652437&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1542

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?rev=652437&r1=652436&r2=652437&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
Wed Apr 30 23:10:08 2008
@@ -282,8 +282,7 @@
                     brokerInfo.setDuplexConnection(configuration.isDuplex());
                     // set our properties
                     Properties props = new Properties();
-                    IntrospectionSupport.getProperties(this, props, null);
-                    props.setProperty("networkTTL", String.valueOf(configuration.getNetworkTTL()));
+                    IntrospectionSupport.getProperties(configuration, props, null);
                     String str = MarshallingSupport.propertiesToString(props);
                     brokerInfo.setNetworkProperties(str);
                     remoteBroker.oneway(brokerInfo);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java?rev=652437&r1=652436&r2=652437&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/IntrospectionSupport.java
Wed Apr 30 23:10:08 2008
@@ -59,7 +59,7 @@
             String name = method.getName();
             Class type = method.getReturnType();
             Class params[] = method.getParameterTypes();
-            if (name.startsWith("get") && params.length == 0 && type != null
&& isSettableType(type)) {
+            if ((name.startsWith("is") || name.startsWith("get")) && params.length
== 0 && type != null && isSettableType(type)) {
 
                 try {
 
@@ -72,8 +72,13 @@
                     if (strValue == null) {
                         continue;
                     }
-
-                    name = name.substring(3, 4).toLowerCase() + name.substring(4);
+                    if (name.startsWith("get")) {
+                        name = name.substring(3, 4).toLowerCase()
+                                + name.substring(4);
+                    } else {
+                        name = name.substring(2, 3).toLowerCase()
+                                + name.substring(3);
+                    }
                     props.put(optionPrefix + name, strValue);
                     rc = true;
 



Mime
View raw message