re PR libgcj/12058 (java.lang.reflect.Array.set(Object, int, Object) throws java.lang.IllegalArgumentException)
PR java/12058: * java/lang/reflect/natArray.cc (set): Allow null as argument. From-SVN: r70813
This commit is contained in:
@@ -364,7 +364,7 @@ java::lang::reflect::Array::set (jobject array, jint index,
|
||||
{
|
||||
// We don't have to call getElementType here, or check INDEX,
|
||||
// because it was already done in the Java wrapper.
|
||||
if (! _Jv_IsInstanceOf (value, elType))
|
||||
if (value != NULL && ! _Jv_IsInstanceOf (value, elType))
|
||||
throw new java::lang::IllegalArgumentException;
|
||||
elements ((jobjectArray) array) [index] = value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user