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

Brenda Finn updated AMQ-5275:
-----------------------------

    Component/s:     (was: Broker)
                 Message Store
    Description: 
We ran code analysis tool findbugs on the source to ensure it was stable for 
our production environment. Within the findings, we noticed that there are two 
places in the code base where ResultSet is not closed. File details are below.

org.apache.activemq.store.jdbc.adapter.TransactDatabaseLocker
Method: doStart():
ResultSet is created on line #51 but is never released. It appears as if it is 
used as a locking mechanism so likely there is not a lot of data that needs to 
be closed, but for best practices, it should be closed to free up any external 
resources.

org.apache.activemq.store.jdbc.LeaseDatabaseLocker
Method: reportLeasOwnerShipAndDuration()
ResultSet is created on line #105 but is never released.

  was:
As part of code analysis using pmd and checkstyle tools, it was reported that 
the ResultSet is not closed in the following file

org.apache.activemq.store.jdbc.adapter.TransactDatabaseLocker
Method: doStart():
ResultSet is created on line #51 but is never released. It appears as if it is 
used as a locking mechanism so likely there is not a lot of data that needs to 
be closed, but for best practices, it should be closed to free up any external 
resources.

org.apache.activemq.store.jdbc.LeaseDatabaseLocker
Method: reportLeasOwnerShipAndDuration()
ResultSet is created on line #105 but is never released.


> ResultSet needs to be released
> ------------------------------
>
>                 Key: AMQ-5275
>                 URL: https://issues.apache.org/jira/browse/AMQ-5275
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.9.0
>         Environment: Solaris 5.10
>            Reporter: Brenda Finn
>            Priority: Minor
>
> We ran code analysis tool findbugs on the source to ensure it was stable for 
> our production environment. Within the findings, we noticed that there are 
> two places in the code base where ResultSet is not closed. File details are 
> below.
> org.apache.activemq.store.jdbc.adapter.TransactDatabaseLocker
> Method: doStart():
> ResultSet is created on line #51 but is never released. It appears as if it 
> is used as a locking mechanism so likely there is not a lot of data that 
> needs to be closed, but for best practices, it should be closed to free up 
> any external resources.
> org.apache.activemq.store.jdbc.LeaseDatabaseLocker
> Method: reportLeasOwnerShipAndDuration()
> ResultSet is created on line #105 but is never released.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to