Calling toString() in the middle of decoding a repeating group breaks the decoding of that group. For example, subsequent entries are skipped:
for (MyGroupDecoder member : decoder.myGroup()) {
logger.debug(decoder);
handle(member.myValue());
}
Only the first member of the repeating group will be handled.
The fix should be pretty simple: generate code into the appendTo method to save and restore index and offset when handling each group, similar to how it already saves and restores limit.
Calling
toString()in the middle of decoding a repeating group breaks the decoding of that group. For example, subsequent entries are skipped:Only the first member of the repeating group will be handled.
The fix should be pretty simple: generate code into the
appendTomethod to save and restoreindexandoffsetwhen handling each group, similar to how it already saves and restoreslimit.