On 11/06/2012 03:00 PM, Alan Bateman wrote:
Peter,
I haven't studied your patch yet but moving the fields into a helper
class is what was envisaged. Here's another reminder that the
initialization has been crying out to be re-worked for some time:
http://bugs.sun.com/view_bug.do?bug_id=7122142
-Alan.
I noticed the static syncronized AnnotationType.getInstance too. My
proposed patch does away with synchronized
Class.initAnnotationsIfNecessary and replaces it with plain
Class.privateGetAnnotations that doesn't use any locks. Therefore it
solves this deadlock.
Regards, Peter