Duplicate :
|
As reported by Alexander Knoller here: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-November/012049.html There is a synchronization bottleneck in Class.getAnnotations. Further, as discussion in that thread describes, there are race conditions that can cause incorrect results when class redefinition occurs. The annotation handling in Java 8 is being extensively revised due to JSR 308 but this bottleneck and race conditions still exist in Java 7 and should be addressed in an update release if feasible.