Skip to content

Commit d9b72a5

Browse files
committed
Fix #1035
1 parent 40d733e commit d9b72a5

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ a pure JSON library.
1919
#1007: Improve error message for `StreamReadConstraints` violations
2020
#1015: `JsonFactory` implementations should respect `CANONICALIZE_FIELD_NAMES`
2121
(contributed by Carter K)
22+
#1035: Root cause for failing test for `testMangledIntsBytes()` in `ParserErrorHandlingTest`
23+
(reported by @harsha-99)
2224

2325
2.15.2 (not yet released)
2426

src/main/java/com/fasterxml/jackson/core/json/UTF8DataInputJsonParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,9 @@ protected JsonToken _parseUnsignedNumber(int c) throws IOException
10831083
}
10841084
_textBuffer.setCurrentLength(outPtr);
10851085
// As per [core#105], need separating space between root values; check here
1086+
_nextByte = c;
10861087
if (_parsingContext.inRoot()) {
10871088
_verifyRootSpace();
1088-
} else {
1089-
_nextByte = c;
10901089
}
10911090
// And there we have it!
10921091
return resetInt(false, intLen);

src/test/java/com/fasterxml/jackson/core/read/ParserErrorHandlingTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ public void testInvalidKeywordsChars() throws Exception {
2323
public void testMangledIntsBytes() throws Exception {
2424
_testMangledNumbersInt(MODE_INPUT_STREAM);
2525
_testMangledNumbersInt(MODE_INPUT_STREAM_THROTTLED);
26-
27-
// 02-Jun-2017, tatu: Fails to fail; should check whether this is expected
28-
// (since DataInput can't do look-ahead)
29-
// _testMangledNumbersInt(MODE_DATA_INPUT);
26+
_testMangledNumbersInt(MODE_DATA_INPUT);
3027
}
3128

3229
public void testMangledFloatsBytes() throws Exception {

0 commit comments

Comments
 (0)