-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Revert "reduces the use of unnecessary exceptions" #261
Conversation
What problem does this code solve? Risk Changes to the API? Will this require a new release? Should the documentation be updated? Change to unit tests? Note |
@stleary looking at the reversal, this does not solve the issue. |
@johnjaylward please elaborate. |
the functions optBoolean, optLong, optInt, etc were calling the get method internally before the original changes were made that this is reverting. |
https://github.com/stleary/JSON-java/blob/master/JSONObject.java#L513 it is still calling get() without a try-catch block, so the issue in #260 is not solved. |
oh nevermind. I thought this was merged already, but I now see it's not. I was mistaken when I saw the closed status above. |
No worries, let me know if you see any other reason not to revert, am otherwise strongly inclined to proceed. |
I ran the tests against the reverted branch just now, and they all seem to pass, while there are failures on master. At this time I see no reason to hold the revert. |
You may want to just add a new commit after the revert to correct the comment fixes that @Simulant87 made in #249. Those are valid fixes. |
@johnjaylward is right. changing
to
in all the optXXX methods fixes the bug. I think I can submit a new merge-request to fix this bug in 12 hours, if you can wait for this. Otherwise someone else can do the fix. |
Reverts #249