HikariCP version: 2.6.1 (by looking at the source, all branches seem to have the same issue)
JDK version : 1.8.0_111
Database : Snowflake
Driver version : 0.9.1
⚠️
Snowflake JDBC driver can take a PrivateKey object as connection property (using put() instead of setProperty())
When creating a HirakiDataSource using Snowflake JDBC driver the datasource initialization fails because the connection property is not a PrivateKey.
Looking at the DriverDataSource constructor all properties are forced to String when the data source is being created:
I understand that Properties is meant for String values, but given that implements a Hashtable<Object, Object> the put() method takes any object and JDBC drivers, like Snowflake, seems to take advantage of this to use non-string property values.
Have you searched the CLOSED issues already? How about checking stackoverflow?
Environment
⚠️ Snowflake JDBC driver can take a
PrivateKey
object as connection property (usingput()
instead ofsetProperty()
)When creating a
HirakiDataSource
using Snowflake JDBC driver the datasource initialization fails because the connection property is not aPrivateKey
.Looking at the
DriverDataSource
constructor all properties are forced to String when the data source is being created:driverProperties.setProperty(entry.getKey().toString(), entry.getValue().toString());
The issue can be fixed by changing the above line to:
driverProperties.put(entry.getKey().toString(), entry.getValue());
I've tried and it works correctly.
I understand that
Properties
is meant forString
values, but given that implements aHashtable<Object, Object>
theput()
method takes any object and JDBC drivers, like Snowflake, seems to take advantage of this to use non-string property values.Have you searched the CLOSED issues already? How about checking stackoverflow?