Author: schor
Date: Thu Oct 13 15:45:47 2016
New Revision: 1764712

URL: http://svn.apache.org/viewvc?rev=1764712&view=rev
Log:
no Jira - add isTopType() to TypeImpl and use it

Modified:
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
    
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java?rev=1764712&r1=1764711&r2=1764712&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
 Thu Oct 13 15:45:47 2016
@@ -368,7 +368,7 @@ public abstract class FSClassRegistry {
         // the "stored" version might have the wrong super class for this type 
system
         type2JCas.put(t2jcciKey, jcci = copyDownDefault_jcasClassInfo);
         
-      } else if (ti != ts.topType) {
+      } else if (!ti.isTopType()) {
         // strong test for non-copy-down case: supertype must match, with 2 
exceptions
         validateSuperClass(jcci, ti);
       }

Modified: 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java?rev=1764712&r1=1764711&r2=1764712&view=diff
==============================================================================
--- 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
 (original)
+++ 
uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/TypeImpl.java
 Thu Oct 13 15:45:47 2016
@@ -1036,6 +1036,9 @@ public class TypeImpl implements Type, C
     staticMergedRefFeaturesList = v;
   }
 
+  public boolean isTopType() {
+    return superType == null;
+  }
 //  /**
 //   * @return the generator
 //   */


Reply via email to