-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Update JSONParserConfiguration usage in JSONTokener, JSONArray, and JSONObject #937
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
Conversation
… JSONArray and JSONObject
|
@michael-ameri This looks like the right approach, although I am a little surprised it works. Will continue reviewing. |
|
very good contribution. I added the missing javadoc and adopted my tests in #938 while keeping your commit in the correct git history attribution making it possible to merge #938 instead of this one. If you prefer to have multiple PRs merge, that would also be fine to me, I can also adopt my tests afer this one is merged. @stleary (Although it would be a backwards compatibility breaking change) I would strongly suggest to remove the getter and setter for JSONParserConfiguration from JSONTokener with the merge of this PR and quickly release a new version to minimise the (faulty) adoption of these methods. Within the library these methods are no longer required. An external caller should not call these methods, as they bring the potential to change the behaviour within a running parsing process, which should use the same configuration end to end. |
thanks for adding the missing parts! I'm totally fine with closing this PR and merging that one.
I completely agree with removing the setter (and then making the field final). Additionally, I think the
Instead, the e.g., what would be the correct behavior, if |
I will look into cleaning it up, but since it's already in released code, and not directly causing a problem, removal is probably not on the table. |
|
What problem does this code solve?
Does the code still compile with Java6? Risks Changes to the API? Will this require a new release? Should the documentation be updated? Does it break the unit tests? Was any code refactored in this commit? Review status Starting 3-day comment window |
|
Notes:
|
|
@michael-ameri Nice work, resolving multiple issues with minimal code changes. |
TODOs, if general approach is accepted, before merging:
-- https://github.com/stleary/JSON-java/pull/934/files#diff-136646e627f31ffe205a70d544d189378bec0a4948fd6b6fd50d541a6dd989a8R494-R527
-- https://github.com/stleary/JSON-java/pull/936/files#diff-4c5e9ffeff459dde83e61bd6361a19988fc84825ff3b62e40dc775711a5e12e0R328-R343