mirror of https://github.com/apache/activemq.git
Fix 1.4 compatibility issue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@416631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ac86d4d01e
commit
4bcac89d49
|
@ -24,6 +24,7 @@ import java.util.Properties;
|
|||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Arrays;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
@ -218,7 +219,7 @@ public final class ReflectionUtil {
|
|||
public static Field[] getAllFields(Class targetClass) {
|
||||
List fieldList = new ArrayList();
|
||||
while (targetClass != null) {
|
||||
Collections.addAll(fieldList, targetClass.getDeclaredFields());
|
||||
fieldList.addAll(Arrays.asList(targetClass.getDeclaredFields()));
|
||||
targetClass = targetClass.getSuperclass();
|
||||
}
|
||||
return (Field[])fieldList.toArray(new Field[0]);
|
||||
|
|
Loading…
Reference in New Issue