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

View File

@ -1,5 +1,8 @@
2003-08-26 Tom Tromey <tromey@redhat.com>
PR java/12058:
* java/lang/reflect/natArray.cc (set): Allow null as argument.
* java/lang/reflect/Proxy.java (ProxyData): `pack' now a String.
(ProxyData.getPackage): New method.
(ProxyData.getProxyData): Use package name, not Package.

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;
}