JDK-8175832 : Release Note: Executable.getAnnotatedReceiverType() is sensitive to the kind of Executable
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 8u40,9
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-02-24
  • Updated: 2022-09-12
  • Resolved: 2017-03-22
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 9
9Resolved
Description
The behavior of `getAnnotatedReceiverType()` has been clarified to return an empty AnnotatedType object only for a method/constructor which could conceptually have a receiver parameter but does not have one at present. (Since there is no receiver parameter, there are no annotations to return.) In addition, the behavior of getAnnotatedReceiverType() has been clarified to return null for a method/constructor which cannot ever have a receiver parameter (and therefore cannot have annotations on the type of a receiver parameter): static methods, and constructors of non-inner classes. 
Incompatibility: Behavioral