Skip to content

Commit

Permalink
Update release notes wrt #86 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 7, 2024
1 parent 14b58b9 commit 4bc3e9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Project: aalto-xml

1.3.3 (not yet released)

#86: Multi-byte characters are split in writeCData() if first byte sits
right at the end of the buffer
(reported, fix contributed by @tatsel)
#90: Update stax2-api dep to 4.2.2 (from 4.2)

1.3.2 (25-Apr-2022)
Expand Down
12 changes: 5 additions & 7 deletions src/main/java/com/fasterxml/aalto/out/ByteXmlWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -794,17 +794,15 @@ protected int writeCDataContents(char[] cbuf, int offset, int len)
{
if (_surrogate != 0) {
outputSurrogates(_surrogate, cbuf[offset]);
// reset the temporary surrogate storage
// reset the temporary surrogate storage
_surrogate = 0;
++offset;
--len;
}
/* Unlike with writeCharacters() and fastWriteName(), let's not
* worry about split buffers here: this is unlikely to become
* performance bottleneck. This allows keeping it simple; and
* should it matter, we could start doing fast version here
* as well.
*/
// Unlike with writeCharacters() and fastWriteName(), let's not
// worry about split buffers here: this is unlikely to become
// performance bottleneck. This allows keeping it simple; and
// should it matter, we could start doing fast version here as well.
len += offset; // now marks the end

main_loop:
Expand Down

0 comments on commit 4bc3e9b

Please sign in to comment.