JDK-8038080 : annotation processors don't visit declaration parameter annotations
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.annotation.processing
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-21
  • Updated: 2014-12-17
  • Resolved: 2014-03-26
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 8 JDK 9
8u20 b09Fixed 9Fixed
Related Reports
Duplicate :  
Relates :  
Description
Liam writes:

There appears to be a javac8 bug that prevents annotation processors from
visiting annotations on parameters. When repeated annotations were
implemented the annotation scanners in JavacProcessingEnvironment
and JavacRoundEnvironment were modified and the following override was 
added:

@Override
public Set<TypeElement> visitExecutable(ExecutableElement e,
Set<TypeElement> p) {
  // Type parameters are not considered to be enclosed by an executable
  scan(e.getTypeParameters(), p);
  return scan(e.getEnclosedElements(), p);
}

MethodSymbols don't have any enclosed elements, but they do have parameters
(which currently aren't being visited). I think that line was meant to
match the base implementation in ElementScanner:

return scan(e.getParameters(), p);