Bug #10227
XML Character Escaping issue on the last chunk
100%
History
#1 Updated by Teodor Gorghe about 1 year ago
- Status changed from New to WIP
When reading XML into a TEMP-TABLE, there is a issue when escapes are used.
SaxReaderImpl com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <TagName>
The cause of this issue is EscapeControlCharsReader.read(char[], int, int).
- when there are some character escapes, there are some characters left in the buffer, which are provided into the buffer on the next EscapeControlCharsReader.read(char[], int, int) call.
- when there are some characters left into the buffer, but the FilterReader returns -1, these characters are no longer sent.
A test that illustrates this issue is the following:
#3 Updated by Teodor Gorghe about 1 year ago
- Status changed from WIP to Review
- % Done changed from 0 to 100
Created task branch 10227a.
Committed revision 1783 on testcases (added tests)
Committed revision 16013 on task branch 10227a.
#4 Updated by Constantin Asofiei about 1 year ago
- there are no more characters to be read (
firstBufLen < len) andsuper.readreturns-1 - something was read from the
buffer, placed intocbuf, and we need to return the number of chars read frombufferand placed incbuf?
#5 Updated by Teodor Gorghe about 1 year ago
Constantin Asofiei wrote:
What's the edge case here? Is this the case when:
- there are no more characters to be read (
firstBufLen < len) andsuper.readreturns-1- something was read from the
buffer, placed intocbuf, and we need to return the number of chars read frombufferand placed incbuf?
Exactly, yes.
#7 Updated by Constantin Asofiei about 1 year ago
- Status changed from Review to Merge Pending
Please check the test from #5494-3 - the file is in the archive at that task. If that works, then we can merge.
#8 Updated by Teodor Gorghe about 1 year ago
Constantin Asofiei wrote:
Please check the test from #5494-3 - the file is in the archive at that task. If that works, then we can merge.
It works:Procedure complete. Press space bar to continue.
I am merging right now.
#9 Updated by Teodor Gorghe about 1 year ago
- Status changed from Merge Pending to Test
Branch 10227a was merged to trunk rev 16014 and archived.
#10 Updated by Constantin Asofiei about 1 year ago
- Project changed from Runtime Infrastructure to Base Language