Author: schor
Date: Fri May  6 17:55:08 2016
New Revision: 1742573

URL: http://svn.apache.org/viewvc?rev=1742573&view=rev
Log: (empty)

Modified:
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java?rev=1742573&r1=1742572&r2=1742573&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java
 Fri May  6 17:55:08 2016
@@ -143,11 +143,10 @@ public class Annotation extends Annotati
    * @return
    */
   public int compareAnnotation(Annotation other) {
-    int[] o = other._intData;
-    int result = Integer.compare(_intData[_FI_begin], o[_FI_begin]);
+    int result = Integer.compare(_getIntValueNc(_FI_begin), 
other._getIntValueNc(_FI_begin));
     if (result != 0) return result;
 
-    result = Integer.compare(_intData[_FI_end], o[_FI_end]);
+    result = Integer.compare(_getIntValueNc(_FI_end), 
other._getIntValueNc(_FI_end));
     return (result == 0) ? 0 : -result;  // reverse compare
   }
   
@@ -157,14 +156,10 @@ public class Annotation extends Annotati
    * @return
    */
   public int compareAnnotation(Annotation other, LinearTypeOrder lto) {
-    int[] o = other._intData;
-    int result = Integer.compare(_intData[_FI_begin], o[_FI_begin]);
+    int result = compareAnnotation(other);
     if (result != 0) return result;
-
-    result = Integer.compare(_intData[_FI_end], o[_FI_end]);
-    if (result != 0) return -result;
     
-    return lto.compare(this,  other);
+    return lto.compare(this, other);
   }
 
 


Reply via email to