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 2024/07/02 07:04:29 UTC
(commons-numbers) branch master updated: Sonar fix: Remove useless assignment
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-numbers.git
The following commit(s) were added to refs/heads/master by this push:
new 0962c68a Sonar fix: Remove useless assignment
0962c68a is described below
commit 0962c68a9e278dcffcee25f63ec9938dea83133a
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Jul 2 08:03:10 2024 +0100
Sonar fix: Remove useless assignment
---
.../src/test/java/org/apache/commons/numbers/arrays/SortingTest.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/SortingTest.java b/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/SortingTest.java
index 83bdd708..45eb1150 100644
--- a/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/SortingTest.java
+++ b/commons-numbers-arrays/src/test/java/org/apache/commons/numbers/arrays/SortingTest.java
@@ -674,10 +674,9 @@ class SortingTest {
final Stream.Builder<Arguments> builder = Stream.builder();
final UniformRandomProvider rng = RandomSource.XO_SHI_RO_128_PP.create();
for (final int size : new int[] {k, 2 * k, 4 * k}) {
- int[] a = rng.ints(size).toArray();
final PermutationSampler s = new PermutationSampler(rng, size, k);
for (int i = k * k; i-- >= 0;) {
- a = rng.ints(size).toArray();
+ final int[] a = rng.ints(size).toArray();
final int[] indices = s.sample();
builder.add(Arguments.of(a, indices));
}