This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: PR 12058 fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]