Setting a field to null with java.lang.reflect.Field.set() fails with
a NullPointerException. Here's a patch:

--- Field.java.bak      2003-10-10 01:15:05.000000000 +0200
+++ Field.java  2003-10-10 01:15:33.000000000 +0200
@@ -247,7 +247,7 @@
                }
        }
        else {
-               if (!type.isInstance(value)) {
+               if (value!=null && !type.isInstance(value)) {
                        throw new IllegalArgumentException("field type mismatch: 
Trying to assign a " + value.getClass().getName() + " to " + toString());
                }
 
Regards,
Laurent

-- 
Laurent Martelli
[EMAIL PROTECTED]                                Java Aspect Components
http://www.aopsys.com/                             http://jac.aopsys.com


_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to