This is an automated email from the ASF dual-hosted git repository.
wanghailin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 6ec16ac46f [Fix][FakeSource] fix random from template not include the
latest value issue (#6438)
6ec16ac46f is described below
commit 6ec16ac46fe8b36c733556f100ac7bb7e4a7e9f4
Author: Jarvis <[email protected]>
AuthorDate: Wed Mar 6 12:05:59 2024 +0800
[Fix][FakeSource] fix random from template not include the latest value
issue (#6438)
---
.../seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java
b/seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java
index 2c4449d21f..9a02eb50be 100644
---
a/seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java
+++
b/seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java
@@ -37,7 +37,7 @@ public class FakeDataRandomUtils {
}
private static <T> T randomFromList(List<T> list) {
- int index = RandomUtils.nextInt(0, list.size() - 1);
+ int index = RandomUtils.nextInt(0, list.size());
return list.get(index);
}