You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/12/14 08:20:00 UTC

[jira] [Commented] (OAK-5787) BlobStore should be Closeable

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

Thomas Mueller commented on OAK-5787:
-------------------------------------

What about implementing AutoCloseable instead of Closeable? That should be compatible with the "throws DataStoreException".

* java.lang.AutoCloseable (since Java 1.7): close() throws Exception
* java.io.Closeable extends AutoCloseable; close() throws IOException

> BlobStore should be Closeable
> -----------------------------
>
>                 Key: OAK-5787
>                 URL: https://issues.apache.org/jira/browse/OAK-5787
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: blob
>            Reporter: Julian Reschke
>            Assignee: Amit Jain
>            Priority: Minor
>             Fix For: 1.10
>
>
> {{DocumentNodeStore}} currently calls {{close()}} if the blob store instance implements {{Closeable}}.
> This has led to problems where wrapper implementations did not implement it, and thus the actual blob store instance wasn't properly shut down.
> Proposal: make {{BlobStore}} extend {{Closeable}} and get rid of all {{instanceof}} checks.
> [~tmueller] [~amitjain] - feedback appreciated.



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