[ 
https://issues.apache.org/jira/browse/JENA-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265435#comment-16265435
 ] 

Andy Seaborne commented on JENA-1436:
-------------------------------------

{{IOUtil.closeQuietly}} says:
{noformat}
 * @deprecated As of 2.6 removed without replacement. Please use the 
try-with-resources statement or handle
     * suppressed exceptions manually.
     * @see Throwable#addSuppressed(java.lang.Throwable)
     */
    @Deprecated
    public static void closeQuietly(final Closeable closeable) {
{noformat}
which shows the migration to try-with-resources which RDFConnection supports.  

{{java.io.Closeable}} is specific to IO streams. The {{close}} operation for 
{{java.io.Closeable}} says: "Closes this stream" and RDFConnection is not a 
stream. The interface declares {{throws IOException}}, which is not appropriate.

So I don't think {{RDFConnection}} should have {{java.io.Closeable}}.


> RDFConnection does not implement Closable interface
> ---------------------------------------------------
>
>                 Key: JENA-1436
>                 URL: https://issues.apache.org/jira/browse/JENA-1436
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Jena
>    Affects Versions: Jena 3.5.0
>            Reporter: Claude Warren
>            Priority: Minor
>
> RDFConnection implements the java.lang.AutoClosable interface but not the 
> java.io.Closable interface.  As such the apache IOUtils.closeQuietly() does 
> not work with an RDFConnection object.  I think that RDFConnection meets the 
> requirements for Closable namely
> A  Closable is a source or destination of data that can be closed.
> The close method is invoked to release resources that the object is
>  holding (such as open files).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to