Skip to content

Commit

Permalink
Merge branch '2.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Feb 13, 2024
2 parents e9eb64b + 10753a0 commit 3ea88fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
12 changes: 2 additions & 10 deletions cbor/src/main/java/tools/jackson/dataformat/cbor/CBORParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,7 @@ private final String _finishLongText(int len) throws JacksonException
break;
default:
// Is this good enough error message?
_reportInvalidChar(c);
_reportInvalidInitial(c);
}
// Need more room?
if (outPtr >= outEnd) {
Expand Down Expand Up @@ -2657,7 +2657,7 @@ private final void _finishChunkedText() throws JacksonException
break;
default:
// Is this good enough error message?
_reportInvalidChar(c);
_reportInvalidInitial(c);
}
// Need more room?
if (outPtr >= outEnd) {
Expand Down Expand Up @@ -3900,14 +3900,6 @@ protected void _reportUnexpectedBreak() throws StreamReadException {
+(_streamReadContext.inObject() ? "Object" : "Array" ));
}

protected void _reportInvalidChar(int c) throws StreamReadException {
// Either invalid WS or illegal UTF-8 start char
if (c < ' ') {
_throwInvalidSpace(c);
}
_reportInvalidInitial(c);
}

protected void _reportInvalidInitial(int mask) throws StreamReadException {
_reportError("Invalid UTF-8 start byte 0x"+Integer.toHexString(mask));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,7 @@ private final void _decodeLongUnicodeValue() throws JacksonException
break;
default:
// Is this good enough error message?
_reportInvalidChar(c);
_reportInvalidInitial(c);
}
// Need more room?
if (outPtr >= outBuf.length) {
Expand Down Expand Up @@ -3373,15 +3373,6 @@ protected void _reportInvalidSharedStringValue(int index) throws StreamReadExcep
index, _seenStringValueCount);
}

protected void _reportInvalidChar(int c) throws StreamReadException
{
// Either invalid WS or illegal UTF-8 start char
if (c < ' ') {
_throwInvalidSpace(c);
}
_reportInvalidInitial(c);
}

protected void _reportInvalidInitial(int mask) throws StreamReadException {
throw _constructReadException("Invalid UTF-8 start byte 0x02X", mask);
}
Expand Down

0 comments on commit 3ea88fc

Please sign in to comment.