nizhikov commented on code in PR #11518: URL: https://github.com/apache/ignite/pull/11518#discussion_r1828922616
########## modules/core/src/main/java/org/apache/ignite/internal/jdbc2/JdbcBlob.java: ########## @@ -134,57 +160,113 @@ public JdbcBlob(byte[] arr) { @Override public int setBytes(long pos, byte[] bytes, int off, int len) throws SQLException { ensureNotClosed(); - if (pos < 1) - throw new SQLException("Invalid argument. Position can't be less than 1 [pos=" + pos + ']'); - - int idx = (int)(pos - 1); - - if (pos - 1 > arr.length || off < 0 || off >= bytes.length || off + len > bytes.length) - throw new ArrayIndexOutOfBoundsException(); + int blobLen = buf.length(); - byte[] dst = arr; - - if (idx + len > arr.length) { - dst = new byte[arr.length + (len - (arr.length - idx))]; - - U.arrayCopy(arr, 0, dst, 0, idx); + if (pos < 1 || pos - 1 > blobLen) Review Comment: parentess for multiline if. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org