Change signature of getXyz() methods in HasXyz interfaces

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Won't Fix
    • open-source
    • Component/s: Database
    • None

      Current signatures have <? extends X>, for example:

      List<? extends MethodInfo> getMethods()
      

      This works fine for Clover's internal data structures (as there are subclasses), but it's not usable by developers using this API. It should be possible to have an assignment like:

      List<HasMetrics> methodMetrics = classInfo.getMethods()
      

      Fix: change to <? super X>.

      Note: We may need to expose additional methods in interface. They could throw Exception("not implemented") or return nulls.

            Assignee:
            Unassigned
            Reporter:
            Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: