JDK-8225755 : ExecutableElement.getReceiverType returns null instead of NOTYPE
  • Type: CSR
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 14
  • Submitted: 2019-06-13
  • Updated: 2019-06-14
  • Resolved: 2019-06-13
Related Reports
CSR :  
Description
Summary
-------

Fix `ExecutableElement.getReceiverType` to follow its specification and to return an object rather than null for "no type" results.

Problem
-------

In cases where the specification of `ExecutableElement.getReceiverType` required a sentinel object to be returned -- a `NoType` [type mirror](https://docs.oracle.com/en/java/javase/12/docs/api/java.compiler/javax/lang/model/type/NoType.html), with kind `NONE` -- the javac implementation returned `null`.

Solution
--------

Fix the implementation to follow the specification.

Specification
-------------

No specification change; behavioral change only.

Comments
Moving to Approved.
13-06-2019