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:
Tom Tromey
2003-08-26 14:55:30 +00:00
committed by Tom Tromey
parent 288e517f66
commit 0f56e0cc56
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -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;
}