Fixed bug with ClassHierarchy w.r.t. arrays
This commit is contained in:
parent
1c712bdce7
commit
4143b9847d
@ -77,11 +77,11 @@ class ClassHierarchy {
|
|||||||
Class<?> c;
|
Class<?> c;
|
||||||
final boolean isArray = clazz.isArray();
|
final boolean isArray = clazz.isArray();
|
||||||
|
|
||||||
if (isArray) {
|
|
||||||
// have to add the original class to the front of the list
|
// have to add the original class to the front of the list
|
||||||
c = getArrayClass(clazz);
|
newList.add(clazz);
|
||||||
newList.add(c);
|
|
||||||
|
|
||||||
|
if (isArray) {
|
||||||
|
// super-types for an array ALSO must be an array.
|
||||||
while (superTypesIterator.hasNext()) {
|
while (superTypesIterator.hasNext()) {
|
||||||
c = superTypesIterator.next();
|
c = superTypesIterator.next();
|
||||||
c = getArrayClass(c);
|
c = getArrayClass(c);
|
||||||
@ -92,9 +92,6 @@ class ClassHierarchy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// have to add the original class to the front of the list
|
|
||||||
newList.add(clazz);
|
|
||||||
|
|
||||||
while (superTypesIterator.hasNext()) {
|
while (superTypesIterator.hasNext()) {
|
||||||
c = superTypesIterator.next();
|
c = superTypesIterator.next();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user