Skip to content

Commit 6ec16ac

Browse files
authored
[Fix][FakeSource] fix random from template not include the latest value issue (#6438)
1 parent a93de4c commit 6ec16ac

File tree

1 file changed

+1
-1
lines changed
  • seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils

1 file changed

+1
-1
lines changed

seatunnel-connectors-v2/connector-fake/src/main/java/org/apache/seatunnel/connectors/seatunnel/fake/utils/FakeDataRandomUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public FakeDataRandomUtils(FakeConfig fakeConfig) {
3737
}
3838

3939
private static <T> T randomFromList(List<T> list) {
40-
int index = RandomUtils.nextInt(0, list.size() - 1);
40+
int index = RandomUtils.nextInt(0, list.size());
4141
return list.get(index);
4242
}
4343

0 commit comments

Comments
 (0)