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

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1441270 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christian Posta 2013-02-01 00:02:30 +00:00
parent 972176ea33
commit 9a2d3d8613
2 changed files with 6 additions and 1 deletions

View File

@ -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) {

View File

@ -280,6 +280,10 @@ public class ReflectionUtilTest extends TestCase {
public void setTestData(TestClass3 testData) {
this.testData = testData;
}
public TestClass3 getRecursiveData() {
return this;
}
}
public class TestClass4 {