JDK-8180892 : Correct handling of annotations on parameters
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 8,9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2017-05-24
  • Updated: 2024-07-09
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
In various cases, core reflection reports incorrect annotation on parameter if the number of parameters in the source code representation and the class file representation differ. Bug JDK-8074977 corrects that behavior for non-static member classes.

The remaining situations should be corrected as well.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/13664 Date: 2023-04-26 04:34:34 +0000
09-07-2024

Additional correction/update to include from feedback received from jfranck after JDK-8074977 was pushed: http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-May/047944.html Nit: TypeAnnotationParser.java "126 // If a constructor has a mandated outer this, that parameter 127 // has no annotations and the annotations to parameter mapping 128 // should be offset by 1." From memory this comment is a bit misleading since the outer this might actually have a receiver type annotation. The outcome seem correct though.
27-05-2017