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); }