Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root cause for failing test for testMangledIntsBytes() in ParserErrorHandlingTest #1035

Closed
harsha-99 opened this issue May 21, 2023 · 1 comment
Labels
2.16 Issue planned (at earliest) for 2.16

Comments

@harsha-99
Copy link

I was looking at the failing tests directory and was trying to debug the failing tests in ParseErrorHandling105Test.java file, I realised there was a similar test commented out in ParserErrorHandlingTest.java under package com.fasterxml.jackson.core.read in line 29 i.e. _testMangledNumbersInt(MODE_DATA_INPUT);
I saw a comment wondering how _testMangledNumbersFloat(MODE_DATA_INPUT); was working.

With my investigation I found out that during _testMangledNumbersIn() execution, _verifyRootSpace() in line 1088 of UTF8DataInputJsonParser.java gets called with _nextByte = -1 and hence satisfies the condition in line 1278 i.e. if (ch <= INT_SPACE) hence doesn't throw a missing WS error. Where as for _testMangledNumbersFloat we set the value as _nextByte = c; in line 1257 and hence it would throw the exception.

I hope this explains the root cause of the issue, happy to receive any feedback or suggestions. Apologies for my verbose explanation.

@harsha-99 harsha-99 changed the title Fix for failing test for testMangledIntsBytes() in ParserErrorHandlingTest in release - 2.16 Root cause for failing test for testMangledIntsBytes() in ParserErrorHandlingTest in release - 2.16 May 21, 2023
@cowtowncoder
Copy link
Member

@harsha-99 Thank you for submitting this. I'll have a look!

@cowtowncoder cowtowncoder added the 2.16 Issue planned (at earliest) for 2.16 label May 22, 2023
@cowtowncoder cowtowncoder changed the title Root cause for failing test for testMangledIntsBytes() in ParserErrorHandlingTest in release - 2.16 Root cause for failing test for testMangledIntsBytes() in ParserErrorHandlingTest May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 Issue planned (at earliest) for 2.16
Projects
None yet
Development

No branches or pull requests

2 participants