Closed GoogleCodeExporter closed 9 years ago
Thanks, Carlos.
Fixed in R388.
Original comment by dale.wil...@gmail.com
on 12 Apr 2010 at 10:34
Hello Dale,
As always thanks for your "QUICKFAST" response.
I've been reviewing your fix and I've seen you have modified the following line:
Original -> if(previousStatus != Context::NULL_VALUE)
Fix R388 -> if(previousStatus != Context::NULL_VALUE && previousStatus !=
Context::UNDEFINED_VALUE)
I think the correct instruction would be the original. Let me show you an
example:
Let's suppose that we have the following template:
<template name="XXXX">
<uint32 name="FIELD" presence='optional'><copy value='2'/></uint32>
</template>
Now, we want let FIELD unset, if I understand the FAST specifications(many
times I
don't), FIELD should be encoded as NULL byte and PMAP as true. But, instead:
1) The dictionary will be updated by line: fieldOp_->setDictionaryValue(encoder,
previousValue);. Note that the dictionary is updated, but previousStatus
variable is
still Context::UNDEFINED_VALUE
2) Now, because previousStatus doesn't satisfy this condition:
if(previousStatus != Context::NULL_VALUE && previousStatus != Context::UNDEFINED_VALUE)
Hereby, the only instruction that will be executed is: pmap.setNextField(false);
Original comment by carlo...@gmail.com
on 12 Apr 2010 at 11:05
One more pass at fixing this one completely: Revised the Ascii and Integer
fixes to
handle all combinations of default value/no default value and
mandatory/optional. (With
a new unit test in testFieldOperations.)
Also applied the same fixes to FieldInstructionDecimal and FieldInstructionBlob
(UTF8
and ByteVector)
Original comment by dale.wil...@gmail.com
on 13 Apr 2010 at 9:11
Original issue reported on code.google.com by
carlo...@gmail.com
on 12 Apr 2010 at 2:19