You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Richard Eckart de Castilho (JIRA)" <de...@uima.apache.org> on 2013/08/10 22:41:47 UTC

[jira] [Commented] (UIMA-3178) JCasIterable closes and destroys reader - causes problems

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

Richard Eckart de Castilho commented on UIMA-3178:
--------------------------------------------------

The documentation to {{BaseCollectionReader}} states 

{quote}
Users of a {{CollectionReader}} should always {{close()}} it when they are finished using it.
{quote}

So it's close() and destroy shouldn't be called? Or still call both but ignore exceptions thrown by destroy?

                
> JCasIterable closes and destroys reader - causes problems
> ---------------------------------------------------------
>
>                 Key: UIMA-3178
>                 URL: https://issues.apache.org/jira/browse/UIMA-3178
>             Project: UIMA
>          Issue Type: Bug
>          Components: uimaFIT
>            Reporter: Richard Eckart de Castilho
>            Assignee: Richard Eckart de Castilho
>             Fix For: 2.0.0uimaFIT
>
>
> JCasIterable closes and destroys reader. The default implementation of {{destroy()}} in {{CollectionReader_ImplBase}} also calls {{close()}}. That means the reader is closed twice, which can cause problems with readers.
> It appears to be better to call only {{destroy()}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira