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 2021/04/30 08:43:28 UTC

[GitHub] [commons-math] msrocka commented on a change in pull request #176: MATH-1572 - Simplify Conditions:

msrocka commented on a change in pull request #176:
URL: https://github.com/apache/commons-math/pull/176#discussion_r623715426



##########
File path: src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
##########
@@ -1133,11 +1133,7 @@ private static boolean hasTies(double[] x, double[] y) {
            throw new InsufficientDataException();
        }
 
-       if (values.length == x.length + y.length) {
-           return false;  // There are no ties.
-       }
-
-       return true;
+       return values.length != x.length + y.length;  // There are no ties.

Review comment:
       The comment is then wrong, isn't it? Before it checked if there are no ties (`values.length == x.length + y.length`) and the comment was related to the `false` return value. Now it directly checks if there are ties which is basically the name of the method so that the comment could be simply removed, right?




-- 
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