Hmmm, yes, it seems that the alreadyCopied method signature was accidentally changed. Jiras issue https://issues.apache.org/jira/browse/UIMA-4428 was created for this, and the fix is done (in the trunk).
Sorry about that! -Marshall On 5/22/2015 6:21 PM, Petr Baudis wrote: > Hi! > > I'm trying to bring uimaj-2.7.0 to my code, but I'm hitting some > trouble with my CasCopier code: > > * alreadyCopied(FeatureStructure fs) is gone without an obvious > replacement; it seems to me that > > alreadyCopied(((FeatureStructureImpl) fs).getAddress()) > > is the correct replacement after digging somewhat at CasCopier > source code, but is that even really right? I guess this > is a bug as that interface was public... > > > * Even with the fix above, my code, e.g. > > > https://github.com/brmson/yodaqa/blob/master/src/main/java/cz/brmlab/yodaqa/analysis/passextract/PassFilter.java#L67 > > crashes with > > Caused by: java.util.ConcurrentModificationException > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.checkConcurrentModification(FSIndexRepositoryImpl.java:967) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.ll_get(FSIndexRepositoryImpl.java:1002) > at > org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.get(FSIndexRepositoryImpl.java:995) > at > org.apache.uima.cas.impl.FSIteratorWrapper.get(FSIteratorWrapper.java:53) > at > org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:67) > at > org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:33) > at > cz.brmlab.yodaqa.analysis.passextract.PassFilter.process(PassFilter.java:74) > at > org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385) > ... 26 more > > so it appears I cannot iterate a source view and simultaneously > copyFs() from it? What are the exact rules for this? It seems > rather contraintuitive to me, and should be documented. > Using the new .withSnapshotIterator() feature helps to work-around > this, but it means I need to uglify code currently using JCasUtil > selects... > > Thanks, >