mjunsilo commented on a change in pull request #66:
URL: https://github.com/apache/uima-uimaj/pull/66#discussion_r505908024



##########
File path: 
uimaj-core/src/main/java/org/apache/uima/cas/impl/BinaryCasSerDes.java
##########
@@ -559,8 +553,10 @@ public SerialFormat reinit(Header h,
       if (!delta) {
         baseCas.resetNoQuestions();
       }
-      
-      
+
+      // isBeforeV3 adjusts binary type numbers, and is reset with the CAS 
when !delta, so it must be set here.
+      isBeforeV3 = !h.isV3 && h.getSeqVersionNbr() < 2;

Review comment:
       Correct, I had this thought myself, but then I thought that it wouldn't 
formally be a full reset when the flag isn't cleared. You could also argue that 
what would happen if someone decided to change this line to the way the 
assignment was done previously without also clearing the flag during reset? The 
error would be introduced again, so I think it also adds a bit of robustness to 
these kind of changes, although it's maybe a bit hypothetic. Anyway, that's why 
I think it is formally better with the extra clear.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to