Derby
  1. Derby
  2. DERBY-5707

Clean up statements in CharUTF8Test

    Details

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

      Description

      CharUTF8Test has two PreparedStatement fields. The statements are closed in tearDown(), but not nulled out. We should null out the references to let the statements be garbage collected.

      1. d5707-1a.diff
        1 kB
        Knut Anders Hatlen
      2. d5707-1b.diff
        1 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        The attached patch makes tearDown() null out the references to the statements instead of closing them. (They will still be closed in super.tearDown().) Also fix a typo in a javadoc comment.

        Show
        Knut Anders Hatlen added a comment - The attached patch makes tearDown() null out the references to the statements instead of closing them. (They will still be closed in super.tearDown().) Also fix a typo in a javadoc comment.
        Hide
        Kristian Waagan added a comment -

        +1
        If you want to, you can also delete this line (unused variable):
        int off = 0;

        Show
        Kristian Waagan added a comment - +1 If you want to, you can also delete this line (unused variable): int off = 0;
        Hide
        Knut Anders Hatlen added a comment -

        Thanks, Kristian. I've updated the patch as suggested.
        Committed revision 1329686.

        Show
        Knut Anders Hatlen added a comment - Thanks, Kristian. I've updated the patch as suggested. Committed revision 1329686.

          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