Skip to content

Commit 65e38cb

Browse files
author
chengyitian
committed
AJ-786: add index check for iotAnyVector's get(int index) method;
1 parent 8d38ec2 commit 65e38cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/xxdb/data/BasicIotAnyVector.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ protected BasicIotAnyVector(ExtendedDataInput in) throws IOException {
5959
}
6060

6161
public Entity get(int index) {
62+
if (index > rows())
63+
throw new RuntimeException(String.format("index %s out of rows %s.", index, rows()));
64+
6265
BasicInt curDataType = (BasicInt) indexsDataType.get(index);
6366
BasicInt curIndex = (BasicInt) indexs.get(index);
6467

0 commit comments

Comments
 (0)