bbenet / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

JsonPath.read() throws ConcurrentModificationException #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
JsonPath.read(sourceJson.clone(), sourcePathStr);
Even I clone sourceJson I still get this exception

When a lot of threads accessing the same JsonPath code.

What is the expected output? What do you see instead?
No ConcurrentModificationException

What version of the product are you using? On what operating system?
Linux, json-path 0.5.3

Please provide any additional information below.

java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextEntry(Unknown Source) ~[na:1.6.0_33]
        at java.util.HashMap$ValueIterator.next(Unknown Source) ~[na:1.6.0_33]
        at com.jayway.jsonpath.filter.TraverseFilter.traverse(TraverseFilter.java:33) ~[json-path-0.5.3.jar:na]
        at com.jayway.jsonpath.filter.TraverseFilter.traverse(TraverseFilter.java:42) ~[json-path-0.5.3.jar:na]
        at com.jayway.jsonpath.filter.TraverseFilter.apply(TraverseFilter.java:23) ~[json-path-0.5.3.jar:na]
        at com.jayway.jsonpath.filter.JsonPathFilterChain.filter(JsonPathFilterChain.java:43) ~[json-path-0.5.3.jar:na]
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:109) ~[json-path-0.5.3.jar:na]
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:160) ~[json-path-0.5.3.jar:na]

Original issue reported on code.google.com by muyen....@gmail.com on 19 Sep 2012 at 6:44

GoogleCodeExporter commented 8 years ago
Can you post the json that caused this error?

Original comment by m...@re-entry.ca on 11 Nov 2012 at 10:06

GoogleCodeExporter commented 8 years ago
Improved thread safety in JsonProvider

Original comment by kalle.st...@gmail.com on 28 Sep 2013 at 3:35