Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6543593
Votes 0
Synopsis (reflect) Clarify private final field mutability
Category java:classes_lang
Reported Against
Release Fixed
State 7-Fix in Progress, bug
Priority: 3-Medium
Related Bugs
Submit Date 06-APR-2007
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
Work Around
N/A
Evaluation
A fine point to clarify.
Posted Date : 2009-10-09 23:42:01.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang