Add Support for the JDBC 4.5 MR

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P4
    • 26
    • Component/s: core-libs
    • None
    • behavioral
    • low
    • Hide
      The updates to the API should have minimal impact WRT compatibility but there are a few changes to highlight:
      1. The default implementation of Statement::enquoteIdentifier is changed so that it throws SQLException if DatabaseMetaData::getIdentifierQuoteString does not return a double quote(as defined in the SQLStandard)
      2. The default implementation of Statement::isSimpleIdentifier is changed to return false if the String passed to the method is a SQL standard reserved word.
             The two changed methods were added in JDK 9. These changes to the
            default implementation has no impact on JDBC drivers that have been
            updated since JDK 9 to override these methods.
      3. If there is an internal(i.e. private/protected) implementation of one of the newly added default methods, it will need to be renamed or possibly made public
      4. A class cannot implement multiple interfaces that provide different default implementations of the same method. Classes that implement Array, Blob, Clob or SQLXML, plus another interface with a default implementation of close will no longer compile, and will fail at runtime with an IncompatibleClassChangeError due to conflicting default methods. Implementations of these interfaces may need to override the close method to resolve the ambiguity.
      Show
      The updates to the API should have minimal impact WRT compatibility but there are a few changes to highlight: 1. The default implementation of Statement::enquoteIdentifier is changed so that it throws SQLException if DatabaseMetaData::getIdentifierQuoteString does not return a double quote(as defined in the SQLStandard) 2. The default implementation of Statement::isSimpleIdentifier is changed to return false if the String passed to the method is a SQL standard reserved word.        The two changed methods were added in JDK 9. These changes to the       default implementation has no impact on JDBC drivers that have been       updated since JDK 9 to override these methods. 3. If there is an internal(i.e. private/protected) implementation of one of the newly added default methods, it will need to be renamed or possibly made public 4. A class cannot implement multiple interfaces that provide different default implementations of the same method. Classes that implement Array, Blob, Clob or SQLXML, plus another interface with a default implementation of close will no longer compile, and will fail at runtime with an IncompatibleClassChangeError due to conflicting default methods. Implementations of these interfaces may need to override the close method to resolve the ambiguity.
    • Java API
    • SE

      Summary

      Add support for JDBC 4.5, which is a maintenance release to the JDBC specification

      Problem

      Add a targeted set of features that were requested by several JDBC driver vendors

      Solution

      The JDBC 4.5 MR will provide the following updates to the JDBC specification:

      • Deprecate SQLPermission for removal

      • Enhance the Blob/Clob/Array/SQLXML/NClob interfaces to extend/support AutoClosable

      • Add the SQL types DECFLOAT, JSON to Types.Java and JDBCType.java

      • Add the quoted identifier methods that were added previously to the Statement interface in JDK 9 to the Connection interface

        • The javadoc & default methods have been improved based on review feedback and was applied to the Statement interface
      • Clarify the Timestamp::hashCode method which incorrectly indicates that nanos are not used when calculating the hash

      Specification

      Please refer to the attached API diff of the javadocs which reflect the changes to the API

            Assignee:
            Lance Andersen
            Reporter:
            Lance Andersen
            Alan Bateman, Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: