Fix strict mode failure when JSONTokener.next() and back() are called before parsing - #1074
Fix strict mode failure when JSONTokener.next() and back() are called before parsing#1074XIAYM-gh wants to merge 3 commits into
Conversation
…next() and back() are called first
|
@XIAYM-gh I will resolve the sonarqube issues separately, you can ignore them |
|
Thanks for noticing! I'll start working on this in a few hours. (it's 5:21 AM in my timezone right now, and probably I will sleep more) |
|
The problems should be settled now. Please review the new changes. |
|
Thanks! I'm currently occupied by military training as a freshman, so the free time I have is really few. But I will get on working this soon. |
|
@XIAYM-gh The requested changes look good, but I think you have included some unrelated changes related to |
|
Oh my - I was too busy and forgot to check my local code - I asked a LLM to create a reference implementation for me, and I had forgotten to switch to another branch. I will now clean them up. |
|
|
Okay, I've deleted the commit. I'll definitely check more carefully next time. |
|
What problem does this code solve? Risks Changes to the Existing Behavior Changes to the API Will this require a new release? Should the documentation be updated? Unit Tests Refactoring Review status Starting 3-day comment window |



This PR fixes #944, where strict mode syntax check isn't working when next() and back() are called first.
ctors are modified, but the backward compatibility is kept.
Besides, I've addedisAtStart()inJSONTokener, which shouldn't be a compatibility issue :)All tests had passed. Thanks ahead for reviewing this!