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 2026/04/14 11:26:15 UTC
(commons-rng) branch master updated (d952d8b2 -> c5cf7f72)
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 d952d8b2 Run builds only on push to master and pull requests
new b5ff9c5e Remove public modifier from test fixtures
new f3308591 sonar fix: Use long for the size estimate
new c5cf7f72 Remove commented out code
The 3 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:
.../org/apache/commons/rng/SplittableUniformRandomProviderTest.java | 2 +-
.../org/apache/commons/rng/core/source32/IntJumpDistancesTest.java | 1 -
.../java/org/apache/commons/rng/core/source32/Philox4x32Test.java | 2 +-
.../java/org/apache/commons/rng/core/source64/Philox4x64Test.java | 2 +-
.../commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java | 4 ++--
5 files changed, 5 insertions(+), 6 deletions(-)
(commons-rng) 03/03: Remove commented out code
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 c5cf7f721f3448c62a16bd96e4d822308d0f7d89
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Apr 14 12:22:28 2026 +0100
Remove commented out code
---
.../java/org/apache/commons/rng/core/source32/IntJumpDistancesTest.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntJumpDistancesTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntJumpDistancesTest.java
index 6f5e4ad2..dbac0d36 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntJumpDistancesTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntJumpDistancesTest.java
@@ -60,7 +60,6 @@ class IntJumpDistancesTest {
final int[] expected = toIntArray(x);
// Result array is assumed to be correct length but at least 2
int[] actual = new int[Math.max(2, 1 + Math.getExponent(x) / 32)];
- //int[] actual = new int[Math.max(2, expected.length)];
IntJumpDistances.writeUnsignedInteger(x, actual);
// Trailing zeros should be unwritten
if (actual.length > expected.length) {
(commons-rng) 02/03: sonar fix: Use long for the size estimate
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 f3308591d918f10535c09f02b5d387062a53f322
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Apr 14 12:18:21 2026 +0100
sonar fix: Use long for the size estimate
---
.../org/apache/commons/rng/SplittableUniformRandomProviderTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commons-rng-client-api/src/test/java/org/apache/commons/rng/SplittableUniformRandomProviderTest.java b/commons-rng-client-api/src/test/java/org/apache/commons/rng/SplittableUniformRandomProviderTest.java
index de556849..e968b76c 100644
--- a/commons-rng-client-api/src/test/java/org/apache/commons/rng/SplittableUniformRandomProviderTest.java
+++ b/commons-rng-client-api/src/test/java/org/apache/commons/rng/SplittableUniformRandomProviderTest.java
@@ -719,7 +719,7 @@ class SplittableUniformRandomProviderTest {
final double[] expected = {start};
// s2. Test advance
- for (double newSize = s2.estimateSize(); newSize-- > 0;) {
+ for (long newSize = s2.estimateSize(); newSize-- > 0;) {
Assertions.assertTrue(s2.tryAdvance((DoubleConsumer) i -> Assertions.assertEquals(expected[0]++, i)));
Assertions.assertEquals(newSize, s2.estimateSize(), "s2 size estimate");
}
(commons-rng) 01/03: Remove public modifier from test fixtures
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 b5ff9c5ec41056897ebc7c94f6cf10b93406af58
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Apr 14 12:15:58 2026 +0100
Remove public modifier from test fixtures
---
.../java/org/apache/commons/rng/core/source32/Philox4x32Test.java | 2 +-
.../java/org/apache/commons/rng/core/source64/Philox4x64Test.java | 2 +-
.../commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/Philox4x32Test.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/Philox4x32Test.java
index 9f3966e3..080a4e11 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/Philox4x32Test.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/Philox4x32Test.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
-public class Philox4x32Test {
+class Philox4x32Test {
// Data from python 3.12.12 using randomgen v2.3.0, e.g.
// from randomgen import Philox
// import numpy as np
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/Philox4x64Test.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/Philox4x64Test.java
index b160b92f..162a57ab 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/Philox4x64Test.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/Philox4x64Test.java
@@ -32,7 +32,7 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
-public class Philox4x64Test {
+class Philox4x64Test {
// Data from python 3.12.12 using randomgen v2.3.0, e.g.
// from randomgen import Philox
// import numpy as np
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java
index 239eb120..8412ae9e 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/test/AbstractWellIndexTableVisibilityTest.java
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
* See <a href="https://github.com/pmd/pmd/issues/6477">PMD issue 6477</a>.
* </p>
*/
-public class AbstractWellIndexTableVisibilityTest {
+class AbstractWellIndexTableVisibilityTest {
static class TestWell extends AbstractWell {
@@ -45,7 +45,7 @@ public class AbstractWellIndexTableVisibilityTest {
}
@Test
- public void test() {
+ void test() {
assertEquals(0, new TestWell(1, new int[1]).next());
}
}