presto-spi/src/main/java/io/prestosql/spi/block/ShortArrayBlockBuilder.java/ShortArrayBlockBuilder/checkReadablePosition
class ShortArrayBlockBuilder:    private void checkReadablePosition(int position)
    {
        if (position < 0 || position >= getPositionCount()) {
            throw new IllegalArgumentException("position is not valid");
        }
    }