Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1628

Good coding practice suggested by static code analysis

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.0
    • Ranger
    • None

    Description

      When sorting collection of objects, it is better to provide a specific Comparator to Collections.sort() API than to have the class of the object implement Comparable interface. It gives more flexibility of sorting and does not require more stringent requirements such as implementing hashCode() and equals() APIs for the object's class.

      Attachments

        Activity

          People

            abhayk Abhay Kulkarni
            abhayk Abhay Kulkarni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: