aherbert commented on a change in pull request #99:
URL: https://github.com/apache/commons-numbers/pull/99#discussion_r654887776
##########
File path:
commons-numbers-combinatorics/src/main/java/org/apache/commons/numbers/combinatorics/FactorialDouble.java
##########
@@ -64,9 +64,7 @@ private FactorialDouble(int numValues,
}
// Copy available values.
- for (int i = beginCopy; i < endCopy; i++) {
- factorialsDouble[i] = cache[i];
- }
+ if (endCopy - 2 >= 0) System.arraycopy(cache, beginCopy,
factorialsDouble, beginCopy, endCopy - 2);
Review comment:
This will fail checkstyle. The logic seems fine.
##########
File path:
commons-numbers-combinatorics/src/main/java/org/apache/commons/numbers/combinatorics/LogFactorial.java
##########
@@ -62,9 +62,7 @@ private LogFactorial(int numValues,
}
// Copy available values.
- for (int i = beginCopy; i < endCopy; i++) {
- logFactorials[i] = cache[i];
- }
+ if (endCopy - 2 >= 0) System.arraycopy(cache, beginCopy,
logFactorials, beginCopy, endCopy - 2);
Review comment:
This will fail checkstyle. The logic seems fine.
--
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:
[email protected]