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

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

XMLWordPrintable

    • behavioral
    • minimal
    • 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.
    • Java API
    • SE

      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.

            alanb Alan Bateman
            alanb Alan Bateman
            Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: