fix Array.makeObjectArray regression

This commit is contained in:
Joel Dice 2010-12-01 15:44:09 -07:00
parent 8cbe323d52
commit 7164743009
2 changed files with 7 additions and 1 deletions

View File

@ -366,7 +366,7 @@ Avian_java_lang_reflect_Array_makeObjectArray
int length = arguments[1];
return reinterpret_cast<int64_t>
(makeObjectArray(t, elementType, length));
(makeObjectArray(t, jclassVmClass(t, elementType), length));
}
extern "C" JNIEXPORT int64_t JNICALL

View File

@ -71,5 +71,11 @@ public class Arrays {
expect(array[1023] == -1);
expect(array[1022] == 0);
}
{ Integer[] array = (Integer[])
java.lang.reflect.Array.newInstance(Integer.class, 1);
array[0] = Integer.valueOf(42);
expect(array[0].intValue() == 42);
}
}
}