aherbert commented on a change in pull request #104:
URL: https://github.com/apache/commons-numbers/pull/104#discussion_r684753035
##########
File path:
commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java
##########
@@ -108,11 +108,11 @@ equivalence classes will have to hold
(2-1)*(3-1)*(5-1)*(7-1)*(11-1) = 480
of all integers.
*/
final Set<Integer> primeNumbers = new HashSet<>();
- primeNumbers.add(Integer.valueOf(2));
- primeNumbers.add(Integer.valueOf(3));
- primeNumbers.add(Integer.valueOf(5));
- primeNumbers.add(Integer.valueOf(7));
- primeNumbers.add(Integer.valueOf(11));
+ primeNumbers.add(2);
Review comment:
The current code makes the boxing explicit. Please avoid auto-boxing.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]