[CONJ-847] NPE at UpdatableResultSet#close Created: 2020-11-30  Updated: 2021-01-29  Resolved: 2021-01-06

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: 2.7.2

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

10.2.31-MariaDB-log
JDBC 2.7.1
Java 8


Issue Links:
Problem/Incident
is caused by CONJ-837 prepared statement cache leak on Resu... Closed

 Description   

There is an NPE that was found in JDBC 2.7.1 and it was OK on 2.6.2.
Probably it's regression of CONJ-837: https://github.com/mariadb-corporation/mariadb-connector-j/commit/efb19400e6bc3c707de9cf00291a49ed732c6ec0

java.lang.NullPointerException
	at org.mariadb.jdbc.internal.com.read.resultset.UpdatableResultSet.close(UpdatableResultSet.java:1473)
	at org.togglz.core.util.DbUtils.closeQuietly(DbUtils.java:33)
	at org.togglz.core.repository.jdbc.SchemaUpdater.migrateToVersion2(SchemaUpdater.java:92)

SchemaUpdater code exists here: https://github.com/togglz/togglz/blob/d4a887ec84748c837c2a1ed6007ff87c48480241/core/src/main/java/org/togglz/core/repository/jdbc/SchemaUpdater.java



 Comments   
Comment by Anand Beh [ 2020-12-12 ]

Can confirm - NPE on the same line number when closing an updatable result set.

Issue is not present on 2.7.0.

Comment by Diego Dupin [ 2021-01-06 ]

reproduced and fixed with https://github.com/mariadb-corporation/mariadb-connector-j/commit/9edc3b88fcd64a24bf38754f100feec7464ca8fb

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