Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225755

ExecutableElement.getReceiverType returns null instead of NOTYPE

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      low
    • Compatibility Risk Description:
      Existing users of the API may have workarounds to the old, buggy, behavior that could need updating. The behavior in cases where there is already a non-`null` result is *not* changed.
    • Interface Kind:
      Java API
    • Scope:
      Implementation

      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, with kind NONE -- the javac implementation returned null.

      Solution

      Fix the implementation to follow the specification.

      Specification

      No specification change; behavioral change only.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                jjg Jonathan Gibbons
                Reviewed By:
                Alex Buckley, Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: