no Jira, comment change only
@@ -1483,9 +1483,10 @@ public class BinaryCasSerDes4 implements SlotKindsConstants {
private TOP currentFs;
/**
+ * Deferred actions to set Feature Slots of feature structures.
* the deferrals needed when deserializing a subtype of AnnotationBase before the sofa is known
* Also for Sofa creation where some fields are final
- * */
+ */
final private List<Runnable> singleFsDefer = new ArrayList<>();
/** used for deferred creation */
@@ -1497,7 +1498,9 @@ public class BinaryCasSerDes4 implements SlotKindsConstants {
private int heapStart;
private int heapEnd;
- /** the "fixups" for relative heap refs */
+ /** the "fixups" for relative heap refs
+ * actions set slot values
+ */
final private List<Runnable> fixupsNeeded = new ArrayList<>();
final private List<Runnable> uimaSerializableFixups = new ArrayList<>();
@@ -1687,6 +1690,10 @@ public class BinaryCasSerDes4 implements SlotKindsConstants {
/*******************************
* walk main heap - deserialize
+ * FS Creation:
+ * - creatCurrentFs -> createFs
+ * - createSofa
+ * - createArray
*******************************/
TypeImpl type;
int arraySize = 0;
@@ -1781,10 +1788,9 @@ public class BinaryCasSerDes4 implements SlotKindsConstants {
prevFsByType[typeCode] = currentFs;
}
-
csds.setHeapEnd(heapEnd);
- if (TRACE_DES) System.out.println("Form4Deser running deferred fixups after all FSs deserialized");
+// if (TRACE_DES) System.out.println("Form4Deser running deferred fixups after all FSs deserialized");
for (Runnable r : fixupsNeeded) {
r.run();
}
@@ -1815,7 +1821,7 @@ public class BinaryCasSerDes4 implements SlotKindsConstants {
private TOP readArray(int iHeap, TypeImpl type) throws IOException {
final int length = readArrayLength();
- TOP fs = ivCas.createArray(type, length);
+ TOP fs = ivCas.createArray(type, length); // create in default view - initial view (iv)cas
if (length == 0) {
return fs;
}
