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

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

commit dc0de568f22370739cf8e45ad17fa7d3fac3d034
Author: Gilles Sadowski <[email protected]>
AuthorDate: Sun Sep 29 15:59:52 2019 +0200

    Diamond operator (generics).
    
    Reported by "SonarQube".
---
 .../src/main/java/org/apache/commons/numbers/complex/Complex.java       | 2 +-
 .../src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
 
b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 28db64e..b0e71ef 100644
--- 
a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ 
b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -1313,7 +1313,7 @@ public final class Complex implements Serializable  {
             throw new IllegalArgumentException("cannot compute zeroth root");
         }
 
-        final List<Complex> result = new ArrayList<Complex>();
+        final List<Complex> result = new ArrayList<>();
 
         // nth root of abs -- faster / more accurate to use a solver here?
         final double nthRootOfAbs = Math.pow(abs(), 1d / n);
diff --git 
a/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java
 
b/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java
index 77676a6..badc11c 100644
--- 
a/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java
+++ 
b/commons-numbers-primes/src/main/java/org/apache/commons/numbers/primes/SmallPrimes.java
@@ -223,7 +223,7 @@ class SmallPrimes {
      * @return the list of prime factors of {@code n}.
      */
     static List<Integer> trialDivision(int n) {
-        final List<Integer> factors = new ArrayList<Integer>(32);
+        final List<Integer> factors = new ArrayList<>(32);
         n = smallTrialDivision(n, factors);
         if (1 == n) {
             return factors;

Reply via email to