[
https://issues.apache.org/jira/browse/UIMA-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Burn Lewis updated UIMA-911:
----------------------------
Attachment: UIMA-911-fix.patch
But this is different ... the user's code is implementing an iterator that the
the UIMA framework is using. The attached fix changes just a few lines in the
AnalysisComponentCasIterator class.
Note that the CPE gets it right when calling collection readers so existing CRs
may break when wrapped as CasMultipliers.
We should at least spell it out in the CAS Multiplier contract:
The framework guarantees that it will not call next unless hasNext has
returned true since the last call to
process or next , but it may call hasNext even if next has not been called
since the last call to hasNext.
And similar warnings where we suggest doing some of the processing in hasNext.
> CasMultiplier's hasNext() called twice without an intervening next()
> --------------------------------------------------------------------
>
> Key: UIMA-911
> URL: https://issues.apache.org/jira/browse/UIMA-911
> Project: UIMA
> Issue Type: Bug
> Components: Core Java Framework
> Reporter: Burn Lewis
> Priority: Minor
> Attachments: UIMA-911-fix.patch, UIMA-911.patch
>
>
> In org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl the
> hasNext method calls the AnalysisComponent's hasNext but then its next method
> calls the AnalysisComponent's hasNext again before calling next.
> Makes it difficult to split the processing between hasNext & next.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.