[ 
https://issues.apache.org/jira/browse/JCR-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571038#action_12571038
 ] 

Esteban Franqueiro commented on JCR-1395:
-----------------------------------------

I agree with Thomas that we don't do a good job with maintaining the utility 
classes, and also we have som duplicated code (eg, in 
BundleDbPersistenceManager there's a closeResultSet() method, and also a few 
direct calls to ResultSet.close(). The same happens with InputStream's. I think 
we should have a common DbHelper with methods like close(ResultSet), 
close(Statement), close(Connection/ConnectionRecoveryManager) (that's because I 
don't like to call methods closeResultSet or closeSilently since it's obvious 
by the signature). Like that, I think we should have a common StreamHelper. I 
don't have a formed opinion on whether we should maintain them or if we should 
use another component, but we should definitely have one or the other. I'll try 
to write a DbHelper class and patch for this.
Still, I think that some of examples mentioned by Jukka are actually very 
useful. In particular, I think that #5 would be very useful for the DbDataStore 
and the DbResources/DbInputStream I posted in JCR-1388.

> Use Commons IO 1.4
> ------------------
>
>                 Key: JCR-1395
>                 URL: https://issues.apache.org/jira/browse/JCR-1395
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: io.patch
>
>
> Commons IO contains a number of utility classes and methods for working with 
> files and streams. Many of those utilities would be quite useful in 
> Jackrabbit, so I'd like to introduce commons-io 1.4 as a dependency to 
> jackrabbit-core.

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

Reply via email to