PMD.

Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/9cc27a5a
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/9cc27a5a
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/9cc27a5a

Branch: refs/heads/master
Commit: 9cc27a5a89e34de8b23b58241adbedb15f50abee
Parents: 1421751
Author: Gilles <er...@apache.org>
Authored: Thu Feb 22 13:25:30 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Thu Feb 22 13:25:30 2018 +0100

----------------------------------------------------------------------
 .../commons/rng/simple/internal/ProviderBuilder.java  | 14 +++++++-------
 .../commons/rng/simple/internal/SeedFactory.java      |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/9cc27a5a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
----------------------------------------------------------------------
diff --git 
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
 
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
index 38097d8..cf82d95 100644
--- 
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
+++ 
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/ProviderBuilder.java
@@ -20,7 +20,7 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 
@@ -49,7 +49,7 @@ import org.apache.commons.rng.core.source64.MersenneTwister64;
  * and performs seed type conversions.
  * </p>
  */
-public class ProviderBuilder {
+public final class ProviderBuilder {
     /** Error message. */
     private static final String INTERNAL_ERROR_MSG = "Internal error: Please 
file a bug report";
     /** Length of the seed array (for random seed). */
@@ -76,19 +76,19 @@ public class ProviderBuilder {
     private static final ByteArray2LongArray BYTE_ARRAY_TO_LONG_ARRAY = new 
ByteArray2LongArray();
     /** Map to convert "Integer" seeds. */
     private static final Map<Class<?>, SeedConverter<Integer,?>> CONV_INT =
-        new HashMap<Class<?>, SeedConverter<Integer,?>>();
+        new ConcurrentHashMap<Class<?>, SeedConverter<Integer,?>>();
     /** Map to convert "int[]" seeds. */
     private static final Map<Class<?>, SeedConverter<int[],?>> CONV_INT_ARRAY =
-        new HashMap<Class<?>, SeedConverter<int[],?>>();
+        new ConcurrentHashMap<Class<?>, SeedConverter<int[],?>>();
     /** Map to convert "Long" seeds. */
     private static final Map<Class<?>, SeedConverter<Long,?>> CONV_LONG =
-        new HashMap<Class<?>, SeedConverter<Long,?>>();
+        new ConcurrentHashMap<Class<?>, SeedConverter<Long,?>>();
     /** Map to convert "long[]" seeds. */
     private static final Map<Class<?>, SeedConverter<long[],?>> 
CONV_LONG_ARRAY =
-        new HashMap<Class<?>, SeedConverter<long[],?>>();
+        new ConcurrentHashMap<Class<?>, SeedConverter<long[],?>>();
     /** Map to convert "byte[]" seeds. */
     private static final Map<Class<?>, SeedConverter<byte[],?>> 
CONV_BYTE_ARRAY =
-        new HashMap<Class<?>, SeedConverter<byte[],?>>();
+        new ConcurrentHashMap<Class<?>, SeedConverter<byte[],?>>();
 
     static {
         // Input seed type is "Long".

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/9cc27a5a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/SeedFactory.java
----------------------------------------------------------------------
diff --git 
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/SeedFactory.java
 
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/SeedFactory.java
index e94df80..0b7f51f 100644
--- 
a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/SeedFactory.java
+++ 
b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/internal/SeedFactory.java
@@ -41,7 +41,7 @@ import org.apache.commons.rng.core.source64.SplitMix64;
  *
  * @since 1.0
  */
-public class SeedFactory {
+public final class SeedFactory {
     /** Generator with a long period. */
     private static final RandomIntSource SEED_GENERATOR;
 

Reply via email to