You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Benedict Holland <be...@gmail.com> on 2019/05/16 22:26:45 UTC

close() never gets called on collection reader

Hi all,

This might be a bug but the close method on the collection reader never
gets called. I set up a breakpoint in an @override close function and it
didn't trigger so I looked into the run queue that calls hasNext() called
ArtifactProducer.run() and there isn't a collectionReader.close() command
anywhere. If this is a bug, I can file a ticket and if not, can I get a
fast example of how I can get close() called?

I need to do a few things after the collection reader ends and it seems
like close was the logical choice. The alternative is to something in
hasNext() when the condition fails but I really don't like that. The close
commands should all go in the close method.

Thanks,
~Ben

Re: close() never gets called on collection reader

Posted by Marshall Schor <ms...@schor.com>.
hi, can you please state which component you're referring to , in which project
(e.g.  uima java sdk, or uima-as, or uimaFIT, or RUTA, etc...).

Is the ArtifactProducer class the
org.apache.uima.collection.impl.cpm.engine.ArtifactProducer, or some other one?

Thanks. -Marshall

On 5/16/2019 6:26 PM, Benedict Holland wrote:
> Hi all,
>
> This might be a bug but the close method on the collection reader never
> gets called. I set up a breakpoint in an @override close function and it
> didn't trigger so I looked into the run queue that calls hasNext() called
> ArtifactProducer.run() and there isn't a collectionReader.close() command
> anywhere. If this is a bug, I can file a ticket and if not, can I get a
> fast example of how I can get close() called?
>
> I need to do a few things after the collection reader ends and it seems
> like close was the logical choice. The alternative is to something in
> hasNext() when the condition fails but I really don't like that. The close
> commands should all go in the close method.
>
> Thanks,
> ~Ben
>