You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/06/30 21:24:13 UTC
svn commit: r1688510 - in
/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl:
FSIndexRepositoryImpl.java FSIntIteratorImplBase.java
Author: schor
Date: Tue Jun 30 19:24:13 2015
New Revision: 1688510
URL: http://svn.apache.org/r1688510
Log:
[UIMA-4487] fix issue with move-to for unordered iterator
Modified:
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java
uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIntIteratorImplBase.java
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java?rev=1688510&r1=1688509&r2=1688510&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java Tue Jun 30 19:24:13 2015
@@ -1226,7 +1226,8 @@ public class FSIndexRepositoryImpl imple
for (int i = 0; i < iterators.length; i++) {
if (kind == FSIndex.SORTED_INDEX) {
// case: sorted index being used in unordered mode, eg. for getAllIndexedFSs
- FSIntArrayIndex<? extends FeatureStructure> sortedIndex = getCachedSortedSubFsLeafIndex(iicp, i);
+ FSIntArrayIndex<? extends FeatureStructure> sortedIndex =
+ (FSIntArrayIndex<? extends FeatureStructure>) ((FSIntIteratorImplBase) iterators[i]).getFSLeafIndexImpl();
if (sortedIndex.findLeftmost(fs) < 0) {
continue; // fs not found in the index of this subtype
}
@@ -1975,18 +1976,6 @@ public class FSIndexRepositoryImpl imple
}
/**
- * Get a particular sorted subLeafIndex
- * Implemented as a subroutine to have the unchecked cast done in one place
- * @param iicp having the subLeafIndexes
- * @param i which sub index to get
- * @return the subindex, cast to FSIntArrayIndex<T>
- */
- private <T extends FeatureStructure> FSIntArrayIndex<T> getCachedSortedSubFsLeafIndex(
- IndexIteratorCachePair<T> iicp, int i) {
- return (FSIntArrayIndex<T>) iicp.cachedSubFsLeafIndexes.get(i);
- }
-
- /**
* Reset all indexes, in one view.
*/
public void flush() {
Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIntIteratorImplBase.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIntIteratorImplBase.java?rev=1688510&r1=1688509&r2=1688510&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIntIteratorImplBase.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIntIteratorImplBase.java Tue Jun 30 19:24:13 2015
@@ -125,4 +125,8 @@ public abstract class FSIntIteratorImplB
public int ll_get() throws NoSuchElementException {
return get();
}
+
+ FSLeafIndexImpl<T> getFSLeafIndexImpl() {
+ return fsLeafIndexImpl;
+ }
}