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/11/30 05:59:06 UTC

svn commit: r1717170 - /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImplC.java

Author: schor
Date: Mon Nov 30 04:59:06 2015
New Revision: 1717170

URL: http://svn.apache.org/viewvc?rev=1717170&view=rev
Log:
[UIMA-4674] when creating a new FS, set the cache-not-in-index.  This may be later optimized to avoid this if there are no features in any index. Remove some debug statements. update the clone method to use the static copyFeature method of CASImpl (added as part of cas copier update)

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

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImplC.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImplC.java?rev=1717170&r1=1717169&r2=1717170&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImplC.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/FeatureStructureImplC.java Mon Nov 30 04:59:06 2015
@@ -162,7 +162,8 @@ public class FeatureStructureImplC imple
     c = _typeImpl.nbrOfUsedRefDataSlots;
     _refData = (c == 0) ? null : new Object[c];
     
-    _id = _casView.setId2fs(this);   
+    _id = _casView.setId2fs(this); 
+    _casView.setCacheNotInIndex(this);
   }
   
   
@@ -334,7 +335,7 @@ public class FeatureStructureImplC imple
     // this case will only happen if we can create non FSArrays
     //   of particular types
 
-    System.out.println("Debug - should never hit this");
+    assert(false);  //System.out.println("Debug - should never hit this");
     return false;
     
 //    return (range.getComponentType() == ((TypeImpl)(vc._typeImpl)).getComponentType());
@@ -679,11 +680,9 @@ public class FeatureStructureImplC imple
     TOP fs = _casView.createFS(_typeImpl);
     TOP srcFs = (TOP) this;
     
-    final int sofaFeatCode = TypeSystemImpl.annotBaseSofaFeatCode;
-
     /* copy all the feature values except the sofa ref which is already set as part of creation */
-    for (Feature feat : _typeImpl.getFeatures()) {
-      _casView.copyFeature(srcFs, feat, fs, feat);
+    for (FeatureImpl feat : _typeImpl.getFeatureImpls()) {
+      CASImpl.copyFeature(srcFs, feat, fs);
     }   // end of for loop
     return fs;
   }