Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The XmiCasDeserializerTest does an invalid operation: It runs two tests sequentially (in the same method), with a cas reset inbetween them. But the first test creates two FSs which are held in Java local variables, and reused after the CAS has been reset (they were never recreated after the CAS was reset).
This causes some strange behavior in Uima V3 (in its current state), which trips a runtime check. The easy fix is to recreate the two FSs after the cas reset.
Besides fixing the test case, maybe add a (maybe optional) catcher for these kinds of errors: something like detecting if a FS that was created in CAS nnn (where nnn is different for different CASs and different "resets" of the same CAS) is attempted to be set as a reference in another CASnnn. Or maybe this is overdesign, since no one's complained...