FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A DESCRIPTION OF THE PROBLEM :
In JDBC 4.2 new default methods were added to the PreparedStatement interface:
default void setObject(int parameterIndex, Object x, SQLType targetSqlType)
throws SQLException {
throw new SQLFeatureNotSupportedException("setObject not implemented");
}
Surely it should delegate to the old setObject method as follows:
default void setObject(int parameterIndex, Object x, SQLType targetSqlType)
throws SQLException {
setObject(parameterIndex,x,targetSqlType.getVendorTypeNumber());
}
With the current implementation there is no point invoking the new method EVER, as there is always a chance that you will change driver to something that doesn't implement it.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
A DESCRIPTION OF THE PROBLEM :
In JDBC 4.2 new default methods were added to the PreparedStatement interface:
default void setObject(int parameterIndex, Object x, SQLType targetSqlType)
throws SQLException {
throw new SQLFeatureNotSupportedException("setObject not implemented");
}
Surely it should delegate to the old setObject method as follows:
default void setObject(int parameterIndex, Object x, SQLType targetSqlType)
throws SQLException {
setObject(parameterIndex,x,targetSqlType.getVendorTypeNumber());
}
With the current implementation there is no point invoking the new method EVER, as there is always a chance that you will change driver to something that doesn't implement it.
REPRODUCIBILITY :
This bug can be reproduced always.