Skip to content

Commit

Permalink
the new base class does not call setSeed,
Browse files Browse the repository at this point in the history
defensive programming against too early calls to setSeed are not useful anymore

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@797246 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Luc Maisonobe committed Jul 23, 2009
1 parent 441880b commit 648a02f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/java/org/apache/commons/math/random/MersenneTwister.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@ public void setSeed(int[] seed) {
* @param seed the initial seed (64 bits integer)
*/
public void setSeed(long seed) {
if (mt == null) {
// this is probably a spurious call from base class constructor,
// we do nothing and wait for the setSeed in our own
// constructors after array allocation
return;
}
setSeed(new int[] { (int) (seed >>> 32), (int) (seed & 0xffffffffl) });
}

Expand Down

0 comments on commit 648a02f

Please sign in to comment.