You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, all instances of that seem to be pretty useless. I don't see how any other threads would be able to write to the writers and require synchronization.
This has been in the code for over 10 years. But agree it seems unnecessary. No objection if someone wants to remove these instances of synchronization.
By looking at the code I noticed some weird synchronization blocks, like:
https://github.com/stleary/JSON-java/blob/master/src/main/java/org/json/JSONObject.java#L2573
Obviously, synchronizing on a newly created object makes no sense.
The text was updated successfully, but these errors were encountered: