activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cepo...@apache.org
Subject svn commit: r1441270 - in /activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src: main/java/org/apache/activemq/tool/properties/ReflectionUtil.java test/java/org/apache/activemq/tool/ReflectionUtilTest.java
Date Fri, 01 Feb 2013 00:02:30 GMT
Author: ceposta
Date: Fri Feb  1 00:02:30 2013
New Revision: 1441270

URL: http://svn.apache.org/viewvc?rev=1441270&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/AMQ-4289 activemq-perf-maven-plugin is unusable
because of bug in ReflectionUtil helper class
also added test to show error

Modified:
    activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
    activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java

Modified: activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java?rev=1441270&r1=1441269&r2=1441270&view=diff
==============================================================================
--- activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
(original)
+++ activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
Fri Feb  1 00:02:30 2013
@@ -213,7 +213,8 @@ public final class ReflectionUtil {
                     } else {
                         try {
                             Object val = getterMethods[i].invoke(targetObject, null);
-                            if (val != null) {
+//                            if (val != null && val != targetObject) {
+                            if (val != null ) {
                                 props.putAll(retrieveClassProperties(propertyName + ".",
val.getClass(), val));
                             }
                         } catch (InvocationTargetException e) {

Modified: activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java?rev=1441270&r1=1441269&r2=1441270&view=diff
==============================================================================
--- activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
(original)
+++ activemq/trunk/activemq-tooling/activemq-perf-maven-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
Fri Feb  1 00:02:30 2013
@@ -280,6 +280,10 @@ public class ReflectionUtilTest extends 
         public void setTestData(TestClass3 testData) {
             this.testData = testData;
         }
+
+        public TestClass3 getRecursiveData() {
+            return this;
+        }
     }
 
     public class TestClass4 {



Mime
View raw message