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

ConcurrentModificationException when writing object to storage #25

Closed
GoogleCodeExporter opened this issue Sep 10, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

When executing the following code 

out = new FileWriter(new File("/sdcard/foo"));
((JSONObject) value).writeJSONString(out, JSONStyle.MAX_COMPRESS);

I get this stacktrace:

Failed to write object to SD: Member
java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextEntry(HashMap.java:792)
java.util.HashMap$EntryIterator.next(HashMap.java:829)
java.util.HashMap$EntryIterator.next(HashMap.java:827)
04-09 17:20:04.786: E/com.flud.util.JsonUtils(537):     at 
net.minidev.json.JSONObject.writeJSONString(JSONObject.java:191)

This seems to only happen for JSONObject but not for JSONArray. I'm using v. 
1.1.1 on Android

Original issue reported on code.google.com by bost...@gmail.com on 9 Apr 2012 at 5:28

@GoogleCodeExporter
Copy link
Author

the bug probably comming from com.flud.util.JsonUtils


for your information a JsonParser object is not thread safe.

Original comment by uriel.chemouni on 1 Sep 2013 at 7:11

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant