shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kalle Korhonen <>
Subject Re: Potential JdbcRealm leak
Date Mon, 20 Dec 2010 18:42:32 GMT
I don't think attachments come through on Apache lists. Creating an
issue is a must since you have to explicitly grant the rights to
include your patch. Creating an issue is simple and patches are always


On Mon, Dec 20, 2010 at 8:37 AM, Jared Bunting
<> wrote:
> 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.  I am attaching a patch
> to fix this, should I create a JIRA issue?
> Note:  In the patch I took different approaches to solving the two different
> leaks.  For the PreparedStatement I simply moved the creation outside of the
> loop – it doesn’t seem necessary to create a new one each time.  For the
> ResultSet, I moved the close statement into a finally block inside the loop.
> Thanks,
> Jared

View raw message