SQLServerCallableStatement::getBoolean throws unhandled ClassCastException when getting bit output parameter #2351
Labels
As designed
The issue in question is as designed, and will not be addressed
Enhancement
An enhancement to the driver. Lower priority than bugs.
Driver version: 12.6.1.jre11, but 12.5 versions also exhibit the bug.
SQL Server version: Microsoft SQL Server 2017 (RTM-CU23) (KB5000685) - 14.0.3381.3 (X64) Feb 9 2021 12:08:50 Developer Edition (64-bit)
OS: Linux (Ubuntu 18.04.6 LTS)
JVM: Oracle OpenJDK 21.0.2
Issue reproduction:
Expected behaviour: the driver returns false, this is what happens in versions prior to 12.5.
Actual behaviour: A ClassCastException is thrown at SQLServerCallableStatement:665. From debugging, in DTVImpl::getValue, this.jdbcType and the requested jdbcType are both BIT, therefore the value object is returned. However, as the value object is an Integer, the subsequent explicit cast to Boolean fails. That's as far as I got.
Log at FINE:
The text was updated successfully, but these errors were encountered: