ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhay Kulkarni (JIRA)" <j...@apache.org>
Subject [jira] [Created] (RANGER-1628) Good coding practice suggested by static code analysis
Date Thu, 01 Jun 2017 21:00:07 GMT
Abhay Kulkarni created RANGER-1628:
--------------------------------------

             Summary: Good coding practice suggested by static code analysis
                 Key: RANGER-1628
                 URL: https://issues.apache.org/jira/browse/RANGER-1628
             Project: Ranger
          Issue Type: Bug
          Components: Ranger
    Affects Versions: 1.0.0
            Reporter: Abhay Kulkarni
            Assignee: Abhay Kulkarni
             Fix For: 1.0.0


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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message