Patch: FYI: PR 12058 fix
Tom Tromey
tromey@redhat.com
Tue Aug 26 16:27:00 GMT 2003
I'm checking this in on the trunk.
This fixes PR 12058. I've already put a regression test in Mauve.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR java/12058:
* java/lang/reflect/natArray.cc (set): Allow null as argument.
Index: java/lang/reflect/natArray.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/reflect/natArray.cc,v
retrieving revision 1.12
diff -u -r1.12 natArray.cc
--- java/lang/reflect/natArray.cc 21 Jul 2003 01:54:06 -0000 1.12
+++ java/lang/reflect/natArray.cc 26 Aug 2003 14:47:38 -0000
@@ -364,7 +364,7 @@
{
// 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;
}
More information about the Java-patches
mailing list