commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject commons-rng git commit: RNG-58: Check is unnecessary.
Date Thu, 04 Oct 2018 23:04:16 GMT
Repository: commons-rng
Updated Branches:
  refs/heads/master 954171567 -> cf8e16eab


RNG-58: Check is unnecessary.

By convention, "no state" is represented by a zero-size array.


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

Branch: refs/heads/master
Commit: cf8e16eab302d24f53276d24e3cd44c827696b88
Parents: 9541715
Author: Gilles <erans@apache.org>
Authored: Fri Oct 5 01:01:30 2018 +0200
Committer: Gilles <erans@apache.org>
Committed: Fri Oct 5 01:01:30 2018 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/commons/rng/core/BaseProvider.java  | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/cf8e16ea/commons-rng-core/src/main/java/org/apache/commons/rng/core/BaseProvider.java
----------------------------------------------------------------------
diff --git a/commons-rng-core/src/main/java/org/apache/commons/rng/core/BaseProvider.java
b/commons-rng-core/src/main/java/org/apache/commons/rng/core/BaseProvider.java
index 334c43d..29d3572 100644
--- a/commons-rng-core/src/main/java/org/apache/commons/rng/core/BaseProvider.java
+++ b/commons-rng-core/src/main/java/org/apache/commons/rng/core/BaseProvider.java
@@ -105,10 +105,6 @@ public abstract class BaseProvider
      */
     protected byte[] composeStateInternal(byte[] state,
                                           byte[] parentState) {
-        if (parentState == null) {
-            return state;
-        }
-
         final int len = parentState.length + state.length;
         final byte[] c = new byte[len];
         System.arraycopy(state, 0, c, 0, state.length);


Mime
View raw message