aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/reflect/natArray.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/reflect/natArray.cc')
-rw-r--r--libjava/java/lang/reflect/natArray.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/libjava/java/lang/reflect/natArray.cc b/libjava/java/lang/reflect/natArray.cc
index fd95368..4bce9ce 100644
--- a/libjava/java/lang/reflect/natArray.cc
+++ b/libjava/java/lang/reflect/natArray.cc
@@ -25,6 +25,9 @@ details. */
#include <java/lang/Boolean.h>
#include <java/lang/Character.h>
+#define BooleanClass _CL_Q34java4lang7Boolean
+extern java::lang::Class BooleanClass;
+
jobject
java::lang::reflect::Array::newInstance (jclass componentType, jint length)
{
@@ -211,10 +214,13 @@ java::lang::reflect::Array::get (jobject array, jint index)
if (elementType == JvPrimClass (char))
return new java::lang::Character (elements ((jcharArray) array) [index]);
if (elementType == JvPrimClass (boolean))
- if (elements ((jbooleanArray) array) [index])
- return java::lang::Boolean::TRUE;
- else
- return java::lang::Boolean::FALSE;
+ {
+ _Jv_InitClass (&BooleanClass);
+ if (elements ((jbooleanArray) array) [index])
+ return java::lang::Boolean::TRUE;
+ else
+ return java::lang::Boolean::FALSE;
+ }
JvThrow (new java::lang::IllegalArgumentException());
}