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 2020/06/07 11:07:38 UTC

[GitHub] [commons-math] XenoAmess opened a new pull request #152: change == 1 to > 0 for result check of compareTo

XenoAmess opened a new pull request #152:
URL: https://github.com/apache/commons-math/pull/152


   Though many implementations of Comparable (including BigFraction) returns only [0, -1, 1] for compareTo function, usually we do not use `== 1` to detect the result, but use [>0, ==0, <0], which is defined in javadoc of class Compare.
   Of course == 1 is correct here, as BigFraction is a final class and nobody can override this compareTo function.
   But I still think it be better to change it to > 0.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [commons-math] asfgit closed pull request #152: [MATH-1545] Follow best practice to test ordering in implementation of Comparable

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #152:
URL: https://github.com/apache/commons-math/pull/152


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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