Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4424215

Error! ResultSet.wasNull() did not return true after reading null value

    Details

    • Subcomponent:
    • Resolved In Build:
      03
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Verified

      Backports

        Description

        Problem Description:
        --------------------

        This bug was discovered on ladybird (jdk 1.3.1) while testing the fix
        for bug 4417105 by Sybase.

        Please find below the details:

        The new bridge does fix the problem we reported.

        However, further testing of the bridge reveals that after reading a SQL
        NULL value by calling ResultSet.getString(), calling ResultSet.wasNull()
        returns false. This is incorrect behavior.

        The problem can be corrected by explicitly setting ResultSet.lastColumnNull
        at every return point in JdbcOdbcResultSet.getString(). Look for the
        comment "ADDED BY SYBASE" in the accompanying copy of the
        JdbcOdbcResultSet.java file.

        Note that this same problem appears to be present in the other getXXX()
        functions such as getBytes(), getDate(), etc. A similar fix should also be
        made to those functions as well.

        I have attached an updated copy of the original BridgeBug.zip file which
        contains patched source to the bridge which fixes the problem with wasNull
        () and getString().


        (See attached file: BridgeBug.zip)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jellissunw Jon Ellis (Inactive)
                  Reporter:
                  cprasadsunw Ck Prasad (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: