Review request:Updated JDK-8004728 Implement core reflection API for parameter reflection (original) (raw)

Joel Borggrén-Franck joel.franck at oracle.com
Thu Dec 20 16:29:58 UTC 2012


On 12/20/2012 03:41 PM, Peter Levart wrote:

On 12/20/2012 02:45 PM, Joel Borggrén-Franck wrote:

Reflective Objects should be created with non-initialized caches of metadata. When someone wants to look at the metatdata we should check the redefine count on Class, and update the caches if necessary. There is already infrastructure for this in the VM for the old annotations byte[] on Field, Method and Constructor.

That's good. So if someone has got a hold on a Method/Field/Constructor instance for a long time (for example some framework that caches reflective object itself), he/she/it will see annotations change between consecutive calls to the instance if they are re-defined.

Regards, Peter

Personally I don't like this, but that seems to be the way this is intended to work. See:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6422536

cheers /Joel



More information about the core-libs-dev mailing list