JDK-8005099 : Synchronization bottleneck in Class.getAnnotations
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2012-12-17
  • Updated: 2013-09-29
  • Resolved: 2013-09-29
Related Reports
Duplicate :  
Description
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.