[
https://issues.apache.org/jira/browse/LUCENE-3680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182096#comment-13182096
]
Robert Muir commented on LUCENE-3680:
-------------------------------------
I committed the patch (backporting), but i found a few more problems relating to
inconsistent use of exceptions when accessing a closed resource.
here are some from 3.x's compoundfiledirectory:
{noformat}
public synchronized void close() throws IOException {
if (stream == null)
throw new IOException("Already closed");
...
public synchronized IndexInput openInput(String id, int readBufferSize)
throws IOException {
if (stream == null)
throw new IOException("Stream closed");
{noformat}
I think the close() one is wrong since it impls closeable, but in the other
case we should use AlreadyClosedException (like other directories).
Ill look around for more of these and create another patch.
> exception consistency in o.a.l.store
> ------------------------------------
>
> Key: LUCENE-3680
> URL: https://issues.apache.org/jira/browse/LUCENE-3680
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Robert Muir
> Priority: Trivial
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3680.patch
>
>
> just some minor improvements:
> * always use EOFException when its eof
> * always include the inputstream too so we know filename etc
> * use FileNotFoundException consistently in CFS when a sub-file is not found
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]