You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by dc...@apache.org on 2025/05/29 22:31:30 UTC
(cassandra-accord) branch trunk updated: Ninja for CASSANDRA-20684: Gens.select didnt allow access at generating a list of size=0 after adding invarients check, fixed that to return an empty list
This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-accord.git
The following commit(s) were added to refs/heads/trunk by this push:
new 7f0040d0 Ninja for CASSANDRA-20684: Gens.select didnt allow access at generating a list of size=0 after adding invarients check, fixed that to return an empty list
7f0040d0 is described below
commit 7f0040d095f47faee1ea29a6c29369fff6da736b
Author: David Capwell <dc...@apple.com>
AuthorDate: Thu May 29 15:31:21 2025 -0700
Ninja for CASSANDRA-20684: Gens.select didnt allow access at generating a list of size=0 after adding invarients check, fixed that to return an empty list
---
accord-core/src/test/java/accord/utils/Gens.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/accord-core/src/test/java/accord/utils/Gens.java b/accord-core/src/test/java/accord/utils/Gens.java
index d9dcfb8e..c310fb6b 100644
--- a/accord-core/src/test/java/accord/utils/Gens.java
+++ b/accord-core/src/test/java/accord/utils/Gens.java
@@ -532,6 +532,8 @@ public class Gens
if (input.isEmpty()) return constant(input);
return rs -> {
int size = sizeGen.nextInt(rs);
+ if (size == 0)
+ return List.of();
Invariants.requireIndexInBounds(input.size(), 0, size);
List<T> remaining = new ArrayList<>(input);
List<T> list = new ArrayList<>(size);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org