7122142 : (ann) Race condition between isAnnotationPresent and getAnnotations

Alan Bateman Alan.Bateman at oracle.com
Wed Jun 19 18:54:28 UTC 2013


On 19/06/2013 15:23, Peter Levart wrote:
> Hi,
>
> Since the bulk of changes to annotations and reflection have 
> stabilized, I'm bringing up a re-based batch that I have proposed some 
> months ago:
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-February/014203.html 
>
>
> :
>
> This patch is one angle of attack for bug 7122142. The other is, off 
> course, removing the other synchronized keyword (on 
> Class.initAnnotationsIfNecessary()). I'm planning to do that too, but 
> in a more straight-forward manner.
>
> Regards, Peter
>
Thank you for coming back to this.

I've looked over the webrev and the approach looks good to me. Joel 
might want to look at this too. Do you think you could include a test 
(as we try to include a test with all fixes if we can)?

It would be good to remove the synchronizaiton on 
initAnnotationsIfNecessary too, but one step as time (and smaller 
changes are always easier to discuss).

-Alan





More information about the core-libs-dev mailing list