[ 
https://issues.apache.org/jira/browse/DERBY-5706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-5706:
--------------------------------------

    Attachment: d5706-1a.diff

Attaching a patch that removes the statement field and instead calls 
createStatement() as needed in the test methods. This also allowed removal of 
tearDown() and simplification of setUp().

The patch additionally removes unused imports and closes a ResultSet that's 
left open.
                
> Clean up statements in CreateTableFromQueryTest
> -----------------------------------------------
>
>                 Key: DERBY-5706
>                 URL: https://issues.apache.org/jira/browse/DERBY-5706
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5706-1a.diff
>
>
> CreateTableFromQueryTest has a Statement field that it closes, but doesn't 
> null out, in tearDown(). Since the field isn't nulled out, it cannot be 
> garbage collected, and one Statement per test case will be left on the heap 
> after completion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to