Uploaded image for project: 'CCC Migration Project'
  1. CCC Migration Project
  2. CCC-8062389

Class.getMethod() is inconsistent with Class.getMethods() results

    XMLWordPrintable

    Details

    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      It's possible, but we have not found any examples to date, that existing code could behave differently with this change. For that reason, a release note is needed, if only to document the change.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Class.getMethods and Class.getMethod can yield inconsistent results when the class/interface hierarchy includes interfaces with default methods.

      Problem

      This CCC is submitted on behalf of Peter Levart.

      Class.getMethods and Class.getMethod can yield inconsistent results when the class/interface hierarchy includes interfaces with default methods.

      Solution

      Update implementation to give consistent results and also update javadoc for these methods to fully specify how they should work.

      Specification

      See attached specdiffs.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alanb Alan Bateman
              Reporter:
              alanb Alan Bateman
              Reviewed By:
              Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: