Commit 9d09d144 by Tom Tromey Committed by Tom Tromey

re PR libgcj/4208 (Problem using 'null' with Java reflection)

	* java/lang/reflect/natField.cc (set): Allow for case when the
	value is null.  Fixes PR libgcj/4208.

From-SVN: r45367
parent 0f64ba53
2001-09-02 Tom Tromey <tromey@redhat.com>
2001-09-03 Tom Tromey <tromey@redhat.com>
* java/security/spec/AlgorithmParameterSpec.java,
java/security/spec/KeySpec.java: Re-merged with Classpath.
* java/lang/reflect/natField.cc (set): Allow for case when the
value is null. Fixes PR libgcj/4208.
* gcj/javaprims.h: Regenerated class list.
* java/lang/IllegalThreadStateException.java,
......
......@@ -418,9 +418,10 @@ java::lang::reflect::Field::setDouble (jclass caller, jobject obj, jdouble d)
}
void
java::lang::reflect::Field::set (jclass caller, jobject object, jobject value, jclass type)
java::lang::reflect::Field::set (jclass caller, jobject object, jobject value,
jclass type)
{
if (! _Jv_IsInstanceOf (value, type))
if (value != NULL && ! _Jv_IsInstanceOf (value, type))
throw new java::lang::IllegalArgumentException;
void* addr = getAddr (this, caller, object);
* (jobject*) addr = value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment