You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by GitBox <gi...@apache.org> on 2020/10/15 22:51:50 UTC

[GitHub] [uima-uimaj] mjunsilo commented on a change in pull request #66: [UIMA 6273] isBeforeV3 variable not reset in BinaryCasSerDes

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:
users@infra.apache.org