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 2017/08/03 21:49:15 UTC
svn commit: r1804047 -
/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java
Author: schor
Date: Thu Aug 3 21:49:15 2017
New Revision: 1804047
URL: http://svn.apache.org/viewvc?rev=1804047&view=rev
Log:
no Jira, add debugging swtich to go back to v2 style annotation comparator that always includes the type priorities
Modified:
uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java
Modified: uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java
URL: http://svn.apache.org/viewvc/uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java?rev=1804047&r1=1804046&r2=1804047&view=diff
==============================================================================
--- uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java (original)
+++ uima/uv3/uimaj-v3/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSIndexRepositoryImpl.java Thu Aug 3 21:49:15 2017
@@ -79,6 +79,8 @@ public class FSIndexRepositoryImpl imple
public final static boolean ITEM_ADDED_TO_INDEX = true;
public final static boolean ITEM_REMOVED_FROM_INDEX = false;
+ /** set next to true to debug issues with different treatment of no type priorities in v3 */
+ public final static boolean V2_ANNOTATION_COMPARE_TYPE_ORDER = false;
/**
* The default size of an index.
*/
@@ -1814,7 +1816,7 @@ public class FSIndexRepositoryImpl imple
private Comparator<TOP> createAnnotationFsComparator() {
final LinearTypeOrder lto = getDefaultTypeOrder(); // used as constant in comparator
- if (lto.isEmptyTypeOrder()) {
+ if (!V2_ANNOTATION_COMPARE_TYPE_ORDER && lto.isEmptyTypeOrder()) {
return this.sii.annotationFsComparatorWithoutId = (fsx1, fsx2) -> {
if (fsx1 == fsx2) return 0;
Annotation fs1 = (Annotation) fsx1;
@@ -1838,7 +1840,7 @@ public class FSIndexRepositoryImpl imple
final LinearTypeOrder lto = getDefaultTypeOrder(); // used as constant in comparator
- if (lto.isEmptyTypeOrder()) {
+ if (!V2_ANNOTATION_COMPARE_TYPE_ORDER && lto.isEmptyTypeOrder()) {
this.sii.annotationFsComparatorWithId = (fsx1, fsx2) -> {
if (fsx1 == fsx2) return 0;