Closed ZackPierce closed 10 years ago
Hi Zack,
Thanks for the bug report and sorry for the slow fix. This bug should now be fixed. Analysis of the problem identified a few related issues in the handling of whitespace when building the JQTI+ object model from the DOM, so I've had to fix those too, and there are some minor internal API changes as a result.
Main changes in this fix are:
Dave, thank you for the thorough and thoughtful fix. I'll be updating openoperator to make use of this quite soon.
uk.ac.ed.ph.jqtiplus.value.StringValue#isNull()
should returntrue
when the wrapped string contents are empty (non-null, but length of 0).The specification states that "empty containers and empty strings are both treated as NULL."
Presently
StringValue#isNull()
always returnsfalse
, because it does not override the base class SingleValue's default behavior.The
isNull
method is widely used throughout the processing portions of JQTI+, and thus this issue impacts the correct behavior of several operators, including core expressions like "And", "Equal", "Or", and naturally, "IsNull".