|
Description
|
Bill Pugh writes:
The documentation for Field is unclear. It could easily be interpreted as
through setAccessible applies to the field, not the Field customer :
> If the underlying field is final, the method throws an IllegalAccessException unless setAccessible(true) has succeeded for this field and this field is non-static.
I think th should be changed to something like.
> If the underlying field is final, the method throws an IllegalAccessException unless isAccessible(true) is true for this Field customer and this Field customer represents a non-static field.
In general, whenever the JavaDoc talks about whether setAccessible has been called for a field,
it should be referring to whether isAccessible returns true for the <code>Field</code> customer . Same for
other subtypes of AccessibleObject.
Posted Date : 2007-04-06 18:33:20.0
|