RFR: 5047859 : (reflect) Class.getField can't find String.length
david.holmes at oracle.com
Tue Aug 27 03:21:43 UTC 2013
On 26/08/2013 10:39 PM, Joel Borggren-Franck wrote:
> Please review doc fix and test for http://bugs.sun.com/view_bug.do?bug_id=5047859
> This is a spec change to update the spec to match the long-standing implementation.
Have to wonder why reflection chose to ignore 'length' when the JLS is
so clear that it is a field ??
Anyway ... I think the added wording to getField() is okay but:
1604 * follows. Let C be the class or interface represented by
I don't think it necessary, or desirable to replace 'class' with 'class
or interface' here. If you do then you should do it everywhere - which
would be bad. Plus does it really mean "class, or interface, or enum, or
annotation" ? Sometimes "class" just means the thing a Class represents.
> There is also a clarification of getFields() javadoc without changing the
I don't think this change make sense given it already says it returns a
zero-length array for array classes - as Mandy pointed out. I don't
think this "clarification" is needed.
More information about the core-libs-dev