From 6ec16ac46fe8b36c733556f100ac7bb7e4a7e9f4 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Wed, 6 Mar 2024 12:05:59 +0800 Subject: [PATCH] [Fix][FakeSource] fix random from template not include the latest value issue (#6438) --- .../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 2c4449d21f9..9a02eb50be2 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 FakeDataRandomUtils(FakeConfig fakeConfig) { } private static T randomFromList(List list) { - int index = RandomUtils.nextInt(0, list.size() - 1); + int index = RandomUtils.nextInt(0, list.size()); return list.get(index); }