[CONJ-650] NegativeArraySizeException while executing org.mariadb.jdbc.internal.com.read.resultset.getObject() Created: 2018-10-02  Updated: 2019-02-08  Resolved: 2018-11-07

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 2.3.0
Fix Version/s: 1.8.0, 2.4.0

Type: Bug Priority: Major
Reporter: Ilya Zhavoronkov Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Environment:

Java 8, Windows/RedHat



 Description   

Got NegativeArraySizeException while executing getObject(columnName, byte[].class), when this field is NULL in actual DB.
getObject(columnName) works fine and returns null as expected.



 Comments   
Comment by Diego Dupin [ 2018-10-04 ]

reproduced.
This occurs as explained with methods getObject(int columnIndex, Class<T> type), exclusively with byte[].class as type parameter.
The null value for other types is handled.

Comment by Ilya Zhavoronkov [ 2018-10-18 ]

So will you fix it?

Comment by Diego Dupin [ 2018-11-07 ]

corrected with commit https://github.com/mariadb/mariadb-connector-j/commit/da51b9477e2414e96e0af5427d48123d5d1eb15c

Generated at Thu Feb 08 03:17:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.