File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
jdbc-v2/src/main/java/com/clickhouse/jdbc/types Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public class ArrayResultSet implements ResultSet {
3939
4040 private final Object array ;
4141 private final int length ;
42- private Integer pos ;
42+ private int pos ;
4343 private boolean closed ;
4444 private ResultSetMetaDataImpl metadata ;
4545
@@ -184,10 +184,10 @@ public boolean getBoolean(int columnIndex) throws SQLException {
184184 @ Override
185185 public byte getByte (int columnIndex ) throws SQLException {
186186 if (columnIndex == 1 ) {
187- if (pos < Byte .MAX_VALUE ) {
187+ if (pos + 1 < Byte .MAX_VALUE ) {
188188 return (byte ) getRow ();
189189 } else {
190- throw new SQLException ("INDEX column value too big and cannot be get as byte" );
190+ throw new SQLException ("INDEX column value too big and cannot be retrieved as byte" );
191191 }
192192 }
193193 return ((Number ) getValueAsObject (columnIndex , Byte .class , 0 )).byteValue ();
@@ -196,10 +196,10 @@ public byte getByte(int columnIndex) throws SQLException {
196196 @ Override
197197 public short getShort (int columnIndex ) throws SQLException {
198198 if (columnIndex == 1 ) {
199- if (pos < Short .MAX_VALUE ) {
199+ if (pos + 1 < Short .MAX_VALUE ) {
200200 return (short ) getRow ();
201201 } else {
202- throw new SQLException ("INDEX column value too big and cannot be get as short" );
202+ throw new SQLException ("INDEX column value too big and cannot be retrieved as short" );
203203 }
204204 }
205205 return ((Number ) getValueAsObject (columnIndex , Short .class , 0 )).shortValue ();
You can’t perform that action at this time.
0 commit comments