Commons Functor
  1. Commons Functor
  2. FUNCTOR-11

Reduce API clutter by removing or reducing scope of FunctorType.equals(FunctorType) methods

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Activity

      Emmanuel Bourg created issue -
      Bruno P. Kinoshita made changes -
      Field Original Value New Value
      Status Open [ 1 ] In Progress [ 3 ]
      Assignee Bruno P. Kinoshita [ kinow ]
      Show
      Bruno P. Kinoshita added a comment - http://svn.apache.org/viewvc?view=revision&revision=r1536009
      Bruno P. Kinoshita made changes -
      Comment [ Hi there,

      I thought about why someone would include equals, toString and hashcode in an interface, like in Functor. As java.lang.Object implements such methods, no compile errors are raised.

      One possibility for having compile time errors would be create an abstract class with the same methods as abstract. But IMHO this option may not be always valid, and it really only clutters the API.

      However, having this in this interface can be helpful for someone interested in implementing a Functor, although this piece of information could be in the project web site, or in a Wiki or something similar. IDE's, like Eclipse, can display the Javadoc for these methods too (sometimes I let the mouse over or click F3 just to see the original code and its Javadoc).

      I believe Java java.util.Map interface also contains equals and hashcode, and in the Javadoc you can read what you need to have in mind when creating your Map.

      I have no strong opinion for this issue, but thought I could just give my 0.02 cents :)

      Cheers, Bruno ]
      Bruno P. Kinoshita made changes -
      Status In Progress [ 3 ] Open [ 1 ]
      Hide
      Bruno P. Kinoshita added a comment -

      Remove duplicate equals() methods. All tests run successfully, no extra information in PMD, CPD or FindBugs reports.

      Show
      Bruno P. Kinoshita added a comment - Remove duplicate equals() methods. All tests run successfully, no extra information in PMD, CPD or FindBugs reports.
      Bruno P. Kinoshita made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Resolution Fixed [ 1 ]
      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open In Progress In Progress
      644d 12h 6m 1 Bruno P. Kinoshita 26/Oct/13 16:09
      In Progress In Progress Open Open
      2h 49m 1 Bruno P. Kinoshita 26/Oct/13 18:58
      Open Open Resolved Resolved
      1m 15s 1 Bruno P. Kinoshita 26/Oct/13 18:59

        People

        • Assignee:
          Bruno P. Kinoshita
          Reporter:
          Emmanuel Bourg
        • Votes:
          1 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development