You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Jared Bunting (JIRA)" <ji...@apache.org> on 2010/12/20 20:35:06 UTC

[jira] Created: (SHIRO-227) Leak in getPermissions method of JdbcRealm

Leak in getPermissions method of JdbcRealm
------------------------------------------

                 Key: SHIRO-227
                 URL: https://issues.apache.org/jira/browse/SHIRO-227
             Project: Shiro
          Issue Type: Bug
            Reporter: Jared Bunting
         Attachments: JdbcRealm_Leak_Fix.patch

It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen reassigned SHIRO-227:
------------------------------------

    Assignee: Kalle Korhonen

> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Jared Bunting
>            Assignee: Kalle Korhonen
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Reopened] (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Les Hazlewood (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood reopened SHIRO-227:
---------------------------------

    
> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Jared Bunting
>            Assignee: Kalle Korhonen
>             Fix For: 1.2.0
>
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

--
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

        

[jira] [Updated] (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Les Hazlewood (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood updated SHIRO-227:
--------------------------------

    Affects Version/s: 1.1.0
        Fix Version/s: 1.2.0
    
> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Jared Bunting
>            Assignee: Kalle Korhonen
>             Fix For: 1.2.0
>
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

--
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

        

[jira] Resolved: (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Kalle Korhonen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen resolved SHIRO-227.
----------------------------------

    Resolution: Fixed

Thanks for the patch!

> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Jared Bunting
>            Assignee: Kalle Korhonen
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Jared Bunting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jared Bunting updated SHIRO-227:
--------------------------------

    Attachment: JdbcRealm_Leak_Fix.patch

Fixes the leak by closing the ResultSet on each iteration of the loop, and only ever creating a single PreparedStatement.

> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Jared Bunting
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (SHIRO-227) Leak in getPermissions method of JdbcRealm

Posted by "Les Hazlewood (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood closed SHIRO-227.
-------------------------------

    Resolution: Fixed

re-closing after associating a 'Fix Version'
                
> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Jared Bunting
>            Assignee: Kalle Korhonen
>             Fix For: 1.2.0
>
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets.  These are both created inside a for loop, but the finally block with close statements is outside of the loop.

--
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