JDK-8213256 : Clarify runtime vs compile time annotations for RoundEnvironment.getElementsAnnotatedWith(Class)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.annotation.processing
  • Affected Version: 12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-11-01
  • Updated: 2018-11-08
  • Resolved: 2018-11-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12 b19Fixed
Related Reports
CSR :  
Relates :  
Description
The two RoundEnvironment methods:

RoundEnvironment.getElementsAnnotatedWith​(Class<? extends Annotation> a)
RoundEnvironment.getElementsAnnotatedWithAny​(Set<Class<? extends
Annotation>> annotations)

can expose a difference between annotation types available at runtime via Class objects versus the annotation types available at compile time as TypeElements.

This hazard should be mentioned in the API docs.
Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/24f37f464da0 User: darcy Date: 2018-11-03 01:49:30 +0000
03-11-2018

Review thread: http://mail.openjdk.java.net/pipermail/compiler-dev/2018-November/012585.html
02-11-2018