Derby
  1. Derby
  2. DERBY-4868

Remove Types.BIT/Types.BOOLEAN switch in JVMInfo

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.7.1.1
    • Component/s: SQL
    • Labels:
      None

      Description

      JVMInfo contains code to switch between using Types.BIT and Types.BOOLEAN based on the JVM version. This was needed when we supported Java 1.3, since Types.BOOLEAN was introduced in Java 1.4 and so Types.BIT had to be used instead on old platforms. Currently, all supported JDBC versions (including JSR-169 for small devices) have Types.BOOLEAN, so the code is no longer needed.

      1. bit-boolean.diff
        3 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        The attached patch removes the code that initializes the field JAVA_SQL_TYPES_BOOLEAN in JVMInfo, since it's always initialized to Types.BOOLEAN. It also makes BaseTypeIdImpl use Types.BOOLEAN directly instead of the field from JVMInfo.

        Show
        Knut Anders Hatlen added a comment - The attached patch removes the code that initializes the field JAVA_SQL_TYPES_BOOLEAN in JVMInfo, since it's always initialized to Types.BOOLEAN. It also makes BaseTypeIdImpl use Types.BOOLEAN directly instead of the field from JVMInfo.
        Hide
        Knut Anders Hatlen added a comment -

        All the regression tests ran cleanly with the patch.

        Show
        Knut Anders Hatlen added a comment - All the regression tests ran cleanly with the patch.
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1028645.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1028645.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development