You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/06/30 13:38:24 UTC

[commons-numbers] 02/03: Remove commented out code.

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 2080a7be7e3f7b9a9f648b3061efe0d36f2be792
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Jun 30 14:14:05 2020 +0100

    Remove commented out code.
    
    The block:
    
    if (isPrime(n)) return n;
    
    is already executed with the same value n in lines above.
---
 .../src/main/java/org/apache/commons/numbers/primes/Primes.java          | 1 -
 1 file changed, 1 deletion(-)

diff --git a/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/Primes.java b/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/Primes.java
index 5c3ad73..b135f4b 100644
--- a/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/Primes.java
+++ b/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/Primes.java
@@ -88,7 +88,6 @@ public final class Primes {
         if (0 == rem) { // if n % 3 == 0
             n += 2; // n % 3 == 2
         } else if (1 == rem) { // if n % 3 == 1
-            // if (isPrime(n)) return n;
             n += 4; // n % 3 == 2
         }
         while (true) { // this loop skips all multiple of 3