You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/02/05 22:09:21 UTC

[GitHub] MarkDacek commented on issue #398: Add ComparableUtils

MarkDacek commented on issue #398: Add ComparableUtils
URL: https://github.com/apache/commons-lang/pull/398#issuecomment-460823621
 
 
   Sorry, was on vacation for a bit. The compareTo method is defined by each class. Not everything will check for nulls, though I would assume most JRE classes would. 
   
   I might think that this idea is better accomplished using static methods and building in null-checks. `new ComparableCheckBuilderl(a).greaterThan(b)` doesn't seem worthwhile when `a.compareTo(b) > 0` is a less-expensive operation. 
   
   Something like `ComparableUtils.greaterThan(a,b)` might be better, though I'm still unsure of its usefulness. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services