field when it is accessible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114896
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-06-22 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/reflect/natField.cc (getAddr): Allow setting of final
+ field when it is accessible.
+
2006-06-21 Bryce McKinlay <mckinlay@redhat.com>
* include/win32-threads.h (_Jv_ThreadDesc_t): New typedef.
// Setting a final field is usually not allowed.
if (checkFinal
+ // As of 1.5, you can set a non-static final field if it is
+ // accessible.
+ && (! field->isAccessible()
+ || (field->getModifiers() & java::lang::reflect::Modifier::STATIC))
&& (field->getModifiers() & java::lang::reflect::Modifier::FINAL))
throw new java::lang::IllegalAccessException(JvNewStringUTF
("Field is final"));