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 2016/09/01 19:25:55 UTC

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

Author: schor
Date: Thu Sep  1 19:25:54 2016
New Revision: 1758843

URL: http://svn.apache.org/viewvc?rev=1758843&view=rev
Log:
[UIMA-4685] merge catchup

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

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/BinaryCasSerDes4.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/BinaryCasSerDes4.java?rev=1758843&r1=1758842&r2=1758843&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/BinaryCasSerDes4.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/impl/BinaryCasSerDes4.java Thu Sep  1 19:25:54 2016
@@ -69,6 +69,7 @@ import org.apache.uima.jcas.cas.Sofa;
 import org.apache.uima.jcas.cas.StringArray;
 import org.apache.uima.jcas.cas.TOP;
 import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.util.CasIOUtils;
 import org.apache.uima.util.impl.DataIO;
 import org.apache.uima.util.impl.OptimizeStrings;
 import org.apache.uima.util.impl.SerializationMeasures;
@@ -551,7 +552,11 @@ public class BinaryCasSerDes4 implements
         .delta(isDelta)
         .typeSystemIndexDefIncluded(isTsi)
         .write(serializedOut);
-             
+     
+      if (isTsi) {
+        CasIOUtils.writeTypeSystem(baseCas, serializedOut, true);    
+      }
+      
       if (TRACE_SER) System.out.println("Form4Ser start, delta: " + (isDelta ? "true" : "false"));
       /*******************************************************************************
        * Setup tables that map to v2 "addresses" - needed for backwards compatibility
@@ -628,6 +633,8 @@ public class BinaryCasSerDes4 implements
 //        System.out.format("debug End of debug scan, heapStart: %,d heapEnd: %,d%n%n", heapStart, heapEnd);
 //      }
       
+      if (TRACE_SER) System.out.println("Form4Ser heapstart: " + heapStart + "  heapEnd: " + heapEnd);
+       
       writeVnumber(control_dos, heapEnd - heapStart);   // used for delta heap size to grow the CAS and ending condition on deser loop
       if (TRACE_SER) System.out.println("Form4Ser heapstart: " + heapStart + "  heapEnd: " + heapEnd);
       Arrays.fill(prevFsByType, null);
@@ -1682,8 +1689,6 @@ public class BinaryCasSerDes4 implements
     
     private void deserialize(int version1) throws IOException {
       if (TRACE_DES) System.out.println("Form4Deser starting");
-     
-      if (TRACE_DES) System.out.println("Form4Deser starting");
       isBeforeV3 = (version1 & 0xff00) == 0;
       
 //      fs2seq.clear();