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 2022/09/26 13:48:11 UTC

[commons-rng] branch master updated (d150ee2f -> 38218ddc)

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

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


    from d150ee2f Correct line number for checkstyle suppression
     new 06e8c275 Remove xdoc processing instruction with reserved name
     new dec8df1c Add missing @since tags
     new 5c0548fb Add japicmp configuration to reporting section
     new 2a81f233 Rename ObjectFactory to SeededObjectFactory
     new 77fdb9ac Formatting
     new c60b105e Javadoc
     new 3e20b6ce Update sampling site page
     new 38218ddc Use better RNGs for the user examples

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commons-rng-client-api/pom.xml                     | 28 ++++++++++++++++++++++
 .../commons/rng/core/util/RandomStreams.java       | 19 ++++++++-------
 .../commons/rng/core/util/RandomStreamsTest.java   | 14 +++++------
 .../InverseTransformContinuousSampler.java         |  2 +-
 .../InverseTransformDiscreteSampler.java           |  2 +-
 commons-rng-sampling/src/site/xdoc/index.xml       | 14 +++++------
 .../apache/commons/rng/simple/RandomSource.java    | 10 ++++----
 src/site/apt/userguide/rng.apt                     |  2 +-
 src/site/xdoc/index.xml                            |  2 +-
 src/site/xdoc/userguide/index.xml                  |  1 -
 10 files changed, 62 insertions(+), 32 deletions(-)


[commons-rng] 03/08: Add japicmp configuration to reporting section

Posted by ah...@apache.org.
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-rng.git

commit 5c0548fb100e58c4cdebefb3998b38558250459b
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:15:27 2022 +0100

    Add japicmp configuration to reporting section
---
 commons-rng-client-api/pom.xml | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/commons-rng-client-api/pom.xml b/commons-rng-client-api/pom.xml
index 8caa9011..29a6a41d 100644
--- a/commons-rng-client-api/pom.xml
+++ b/commons-rng-client-api/pom.xml
@@ -69,4 +69,32 @@
       </plugin>
     </plugins>
   </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>com.github.siom79.japicmp</groupId>
+        <artifactId>japicmp-maven-plugin</artifactId>
+        <configuration>
+          <parameter>
+            <!-- Adding Java 8 default methods should not break binary compatibility. -->
+            <overrideCompatibilityChangeParameters>
+              <overrideCompatibilityChangeParameter>
+                <compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
+                <binaryCompatible>true</binaryCompatible>
+                <sourceCompatible>true</sourceCompatible>
+                <semanticVersionLevel>PATCH</semanticVersionLevel>
+              </overrideCompatibilityChangeParameter>
+              <overrideCompatibilityChangeParameter>
+                <compatibilityChange>METHOD_ABSTRACT_NOW_DEFAULT</compatibilityChange>
+                <binaryCompatible>true</binaryCompatible>
+                <sourceCompatible>true</sourceCompatible>
+                <semanticVersionLevel>PATCH</semanticVersionLevel>
+              </overrideCompatibilityChangeParameter>
+            </overrideCompatibilityChangeParameters>
+          </parameter>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>


[commons-rng] 02/08: Add missing @since tags

Posted by ah...@apache.org.
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-rng.git

commit dec8df1caa0856f197fb002894f8b1346155b15f
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:09:49 2022 +0100

    Add missing @since tags
---
 .../src/main/java/org/apache/commons/rng/core/util/RandomStreams.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
index bff9eccd..003addd3 100644
--- a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
+++ b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
@@ -26,6 +26,8 @@ import org.apache.commons.rng.UniformRandomProvider;
 
 /**
  * Utility for creating streams using a source of randomness.
+ *
+ * @since 1.5
  */
 public final class RandomStreams {
     /** The number of bits of each random character in the seed.
@@ -36,6 +38,7 @@ public final class RandomStreams {
      * A factory for creating objects using a seed and a using a source of randomness.
      *
      * @param <T> the object type
+     * @since 1.5
      */
     public interface ObjectFactory<T> {
         /**


[commons-rng] 04/08: Rename ObjectFactory to SeededObjectFactory

Posted by ah...@apache.org.
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-rng.git

commit 2a81f233ba2c36b025739dbfa3df2b61ac213fb8
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:23:17 2022 +0100

    Rename ObjectFactory to SeededObjectFactory
    
    The name captures the fact that the object is created using a seed
    source.
---
 .../org/apache/commons/rng/core/util/RandomStreams.java    | 10 +++++-----
 .../apache/commons/rng/core/util/RandomStreamsTest.java    | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
index 003addd3..d0163310 100644
--- a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
+++ b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
@@ -40,7 +40,7 @@ public final class RandomStreams {
      * @param <T> the object type
      * @since 1.5
      */
-    public interface ObjectFactory<T> {
+    public interface SeededObjectFactory<T> {
         /**
          * Creates the object.
          *
@@ -80,7 +80,7 @@ public final class RandomStreams {
      */
     public static <T> Stream<T> generateWithSeed(long streamSize,
                                                  SplittableUniformRandomProvider source,
-                                                 ObjectFactory<T> factory) {
+                                                 SeededObjectFactory<T> factory) {
         if (streamSize < 0) {
             throw new IllegalArgumentException("Invalid stream size: " + streamSize);
         }
@@ -191,7 +191,7 @@ public final class RandomStreams {
         /** Source of randomness used to initialise the new instances. */
         private final SplittableUniformRandomProvider source;
         /** Factory to create new instances. */
-        private final ObjectFactory<T> factory;
+        private final SeededObjectFactory<T> factory;
 
         /**
          * @param start Start position of the stream (inclusive).
@@ -203,7 +203,7 @@ public final class RandomStreams {
          */
         SeededObjectSpliterator(long start, long end,
                                 SplittableUniformRandomProvider source,
-                                ObjectFactory<T> factory,
+                                SeededObjectFactory<T> factory,
                                 long seed) {
             position = start;
             this.end = end;
@@ -266,7 +266,7 @@ public final class RandomStreams {
                 // Ensure forEachRemaining is called only once
                 position = last;
                 final SplittableUniformRandomProvider s = source;
-                final ObjectFactory<T> f = factory;
+                final SeededObjectFactory<T> f = factory;
                 do {
                     action.accept(f.create(seed | pos, s));
                     pos++;
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/RandomStreamsTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/RandomStreamsTest.java
index 175af082..c65ccbe8 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/RandomStreamsTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/RandomStreamsTest.java
@@ -30,7 +30,7 @@ import java.util.stream.LongStream;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.rng.SplittableUniformRandomProvider;
 import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.core.util.RandomStreams.ObjectFactory;
+import org.apache.commons.rng.core.util.RandomStreams.SeededObjectFactory;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -226,7 +226,7 @@ class RandomStreamsTest {
     @ValueSource(longs = {-1, -2, Long.MIN_VALUE})
     void testGenerateWithSeedInvalidStreamSizeThrows(long size) {
         final SplittableUniformRandomProvider source = new SequenceGenerator(0);
-        final ObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
+        final SeededObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
         final IllegalArgumentException ex1 = Assertions.assertThrows(IllegalArgumentException.class,
             () -> RandomStreams.generateWithSeed(size, source, factory));
         // Check the exception method is consistent with UniformRandomProvider stream methods
@@ -239,7 +239,7 @@ class RandomStreamsTest {
     void testGenerateWithSeedNullArgumentThrows() {
         final long size = 10;
         final SplittableUniformRandomProvider source = new SequenceGenerator(0);
-        final ObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
+        final SeededObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
         Assertions.assertThrows(NullPointerException.class,
             () -> RandomStreams.generateWithSeed(size, null, factory));
         Assertions.assertThrows(NullPointerException.class,
@@ -277,7 +277,7 @@ class RandomStreamsTest {
         Assertions.assertEquals(1, RandomStreams.createSeed(rng), "Unexpected seed value");
 
         // Create a factory that will return the seed passed to the factory
-        final ObjectFactory<Long> factory = (s, r) -> {
+        final SeededObjectFactory<Long> factory = (s, r) -> {
             Assertions.assertSame(rng, r, "The source RNG is not used");
             return Long.valueOf(s);
         };
@@ -303,7 +303,7 @@ class RandomStreamsTest {
     void testGenerateWithSeedSpliteratorThrows() {
         final long size = 10;
         final SplittableUniformRandomProvider source = new SequenceGenerator(0);
-        final ObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
+        final SeededObjectFactory<Long> factory = (s, r) -> Long.valueOf(s);
         final Spliterator<Long> s1 = RandomStreams.generateWithSeed(size, source, factory).spliterator();
         final Consumer<Long> badAction = null;
         final NullPointerException ex1 = Assertions.assertThrows(NullPointerException.class, () -> s1.tryAdvance(badAction), "tryAdvance");
@@ -334,7 +334,7 @@ class RandomStreamsTest {
         Assertions.assertEquals(initial, RandomStreams.createSeed(rng), "Unexpected seed value");
 
         // Create a factory that will return the seed passed to the factory
-        final ObjectFactory<Long> factory = (s, r) -> {
+        final SeededObjectFactory<Long> factory = (s, r) -> {
             Assertions.assertSame(rng, r, "The source RNG is not used");
             return Long.valueOf(s);
         };
@@ -418,7 +418,7 @@ class RandomStreamsTest {
         Assertions.assertEquals(initial, RandomStreams.createSeed(rng), "Unexpected seed value");
 
         // Create a factory that will return the seed passed to the factory
-        final ObjectFactory<Long> factory = (s, r) -> {
+        final SeededObjectFactory<Long> factory = (s, r) -> {
             Assertions.assertSame(rng, r, "The source RNG is not used");
             return Long.valueOf(s);
         };


[commons-rng] 08/08: Use better RNGs for the user examples

Posted by ah...@apache.org.
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-rng.git

commit 38218ddc30a9a6b9e25e6927acdb0ed5cd4a44db
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 14:09:44 2022 +0100

    Use better RNGs for the user examples
    
    Replace Mersenne-Twister (MT) with a more robust xor-based generator
    XO_RO_SHI_RO_128_PP
---
 .../distribution/InverseTransformContinuousSampler.java        |  2 +-
 .../sampling/distribution/InverseTransformDiscreteSampler.java |  2 +-
 .../main/java/org/apache/commons/rng/simple/RandomSource.java  | 10 +++++-----
 src/site/apt/userguide/rng.apt                                 |  2 +-
 src/site/xdoc/index.xml                                        |  2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
index 3df26152..e274123b 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
@@ -42,7 +42,7 @@ import org.apache.commons.rng.UniformRandomProvider;
  * final RealDistribution dist = new ChiSquaredDistribution(9);
  * // Create the sampler.
  * final ContinuousSampler chiSquareSampler =
- *     InverseTransformContinuousSampler.of(RandomSource.MT.create(),
+ *     InverseTransformContinuousSampler.of(RandomSource.XO_RO_SHI_RO_128_PP.create(),
  *                                          new ContinuousInverseCumulativeProbabilityFunction() {
  *                                              public double inverseCumulativeProbability(double p) {
  *                                                  return dist.inverseCumulativeProbability(p);
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
index 29dfc4fa..bab46280 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
@@ -42,7 +42,7 @@ import org.apache.commons.rng.UniformRandomProvider;
  * final IntegerDistribution dist = new BinomialDistribution(11, 0.56);
  * // Create the sampler.
  * final DiscreteSampler binomialSampler =
- *     InverseTransformDiscreteSampler.of(RandomSource.MT.create(),
+ *     InverseTransformDiscreteSampler.of(RandomSource.XO_RO_SHI_RO_128_PP.create(),
  *                                        new DiscreteInverseCumulativeProbabilityFunction() {
  *                                            public int inverseCumulativeProbability(double p) {
  *                                                return dist.inverseCumulativeProbability(p);
diff --git a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/RandomSource.java b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/RandomSource.java
index 0c834499..e7fbb386 100644
--- a/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/RandomSource.java
+++ b/commons-rng-simple/src/main/java/org/apache/commons/rng/simple/RandomSource.java
@@ -29,17 +29,17 @@ import org.apache.commons.rng.simple.internal.SeedFactory;
  *
  * <p>Usage examples:</p>
  * <pre><code>
- *  UniformRandomProvider rng = RandomSource.MT.create();
+ *  UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
  * </code></pre>
  * or
  * <pre><code>
  *  final int[] seed = new int[] { 196, 9, 0, 226 };
- *  UniformRandomProvider rng = RandomSource.MT.create(seed);
+ *  UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create(seed);
  * </code></pre>
  * or
  * <pre><code>
  *  final int[] seed = RandomSource.createIntArray(256);
- *  UniformRandomProvider rng = RandomSource.MT.create(seed);
+ *  UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create(seed);
  * </code></pre>
  * where the enum value is the identifier of the generator's concrete
  * implementation, and the argument to method {@code create} is the
@@ -825,11 +825,11 @@ public enum RandomSource {
      *
      * <p>Usage example:</p>
      * <pre><code>
-     *  UniformRandomProvider rng = RandomSource.MT.create();
+     *  UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
      * </code></pre>
      * <p>or, if a {@link RestorableUniformRandomProvider "save/restore"} functionality is needed,</p>
      * <pre><code>
-     *  RestorableUniformRandomProvider rng = RandomSource.MT.create();
+     *  RestorableUniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
      * </code></pre>
      *
      * <p>This method will raise an exception if the generator requires arguments in addition
diff --git a/src/site/apt/userguide/rng.apt b/src/site/apt/userguide/rng.apt
index 1e72b33e..1a07f9fb 100644
--- a/src/site/apt/userguide/rng.apt
+++ b/src/site/apt/userguide/rng.apt
@@ -136,7 +136,7 @@ The Apache Commons RNG User Guide
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.simple.RandomSource;
 
-UniformRandomProvider rng = RandomSource.MT.create();
+UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
 +--------------------------+
 
 
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 02ab036f..5b098b4f 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -39,7 +39,7 @@
 import org.apache.commons.rng.simple.RandomSource;
 
 // Instantiate a "Mersenne-Twister" generator with a factory method.
-UniformRandomProvider rng = RandomSource.MT.create();
+UniformRandomProvider rng = RandomSource.XO_RO_SHI_RO_128_PP.create();
 
 // Use it to produce a floating-point value between 0 and 1.
 double random = rng.nextDouble();


[commons-rng] 07/08: Update sampling site page

Posted by ah...@apache.org.
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-rng.git

commit 3e20b6ceba8bb24422a95fcc5ed1bd0f57a1ffe4
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:59:20 2022 +0100

    Update sampling site page
    
    Remove deprecated API from UnitSphereSampler example.
    
    Use diamond operator.
---
 commons-rng-sampling/src/site/xdoc/index.xml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/commons-rng-sampling/src/site/xdoc/index.xml b/commons-rng-sampling/src/site/xdoc/index.xml
index 09c91a7d..f523a42e 100644
--- a/commons-rng-sampling/src/site/xdoc/index.xml
+++ b/commons-rng-sampling/src/site/xdoc/index.xml
@@ -69,13 +69,13 @@ public class NormalDeviates {
 import java.util.HashSet;
 import org.apache.commons.rng.sampling.CollectionSampler;
 
-HashSet&lt;String&gt; list = new HashSet&lt;String&gt;();
-list.add("Apache");
-list.add("Commons");
-list.add("RNG");
+HashSet&lt;String&gt; elements = new HashSet&lt;&gt;();
+elements.add("Apache");
+elements.add("Commons");
+elements.add("RNG");
 
-CollectionSampler&lt;String&gt; sampler = new CollectionSampler&lt;String&gt;(RandomSource.MWC_256.create(),
-                                                                  list);
+CollectionSampler&lt;String&gt; sampler = new CollectionSampler&lt;&gt;(RandomSource.MWC_256.create(),
+                                                            elements);
 String word = sampler.sample();
 </source>
       </p>
@@ -92,7 +92,7 @@ String word = sampler.sample();
 import org.apache.commons.rng.sampling.UnitSphereSampler;
 
 int dimension = 3;
-UnitSphereSampler sampler = new UnitSphereSampler(dimension, RandomSource.KISS.create());
+UnitSphereSampler sampler = UnitSphereSampler.of(dimension, RandomSource.KISS.create());
 
 double[] vector = sampler.sample();
 </source>


[commons-rng] 01/08: Remove xdoc processing instruction with reserved name

Posted by ah...@apache.org.
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-rng.git

commit 06e8c275c81f9774e4432fbd4bc5f07b1b1b2b88
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:09:44 2022 +0100

    Remove xdoc processing instruction with reserved name
---
 src/site/xdoc/userguide/index.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/site/xdoc/userguide/index.xml b/src/site/xdoc/userguide/index.xml
index 2fceed15..4b594d0a 100644
--- a/src/site/xdoc/userguide/index.xml
+++ b/src/site/xdoc/userguide/index.xml
@@ -17,7 +17,6 @@
    limitations under the License.
   -->
 
-<?xml-stylesheet type="text/xsl" href="./xdoc.xsl"?>
 <document url="index.html">
   <properties>
     <title>The Commons RNG User Guide - Table of Contents</title>


[commons-rng] 06/08: Javadoc

Posted by ah...@apache.org.
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-rng.git

commit c60b105ed53a0518d171a792040f47eeec8fe000
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:24:47 2022 +0100

    Javadoc
---
 .../src/main/java/org/apache/commons/rng/core/util/RandomStreams.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
index cf64b911..7b23c00e 100644
--- a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
+++ b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
@@ -58,7 +58,7 @@ public final class RandomStreams {
 
     /**
      * Returns a stream producing the given {@code streamSize} number of new objects
-     * generated using the supplied {@code source} of randomness using the {@code factory}.
+     * generated using the supplied {@code source} of randomness and object {@code factory}.
      *
      * <p>A {@code long} seed is provided for each object instance using the stream position
      * and random bits created from the supplied {@code source}.
@@ -76,7 +76,7 @@ public final class RandomStreams {
      * @param factory Factory to create new instances.
      * @return a stream of objects; the stream is limited to the given {@code streamSize}.
      * @throws IllegalArgumentException if {@code streamSize} is negative.
-     * @throws NullPointerException if {@code source} or {@code factory} is null
+     * @throws NullPointerException if {@code source} or {@code factory} is null.
      */
     public static <T> Stream<T> generateWithSeed(long streamSize,
                                                  SplittableUniformRandomProvider source,


[commons-rng] 05/08: Formatting

Posted by ah...@apache.org.
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-rng.git

commit 77fdb9ac52a890234252d72582ffc5cb65839539
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Sep 26 13:23:35 2022 +0100

    Formatting
---
 .../src/main/java/org/apache/commons/rng/core/util/RandomStreams.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
index d0163310..cf64b911 100644
--- a/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
+++ b/commons-rng-core/src/main/java/org/apache/commons/rng/core/util/RandomStreams.java
@@ -88,7 +88,7 @@ public final class RandomStreams {
         Objects.requireNonNull(factory, "factory");
         final long seed = createSeed(source);
         return StreamSupport
-                .stream(new SeededObjectSpliterator<>(0, streamSize, source, factory, seed), false);
+            .stream(new SeededObjectSpliterator<>(0, streamSize, source, factory, seed), false);
     }
 
     /**