jayway/JsonPath — pull request #17 by alfthomas (2013-05-14 20:10:02+00:00)
Title: Underlying net.minidev.json.parser.JsonParser is not threadsafe

I'm occasionally seeing this error running tests in parallell with maven surefire:

java.lang.RuntimeException: Internal Error
at net.minidev.json.parser.JSONParserBase.readArray(JSONParserBase.java:237)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:306)
at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:442)
at net.minidev.json.parser.JSONParserBase.readMain(JSONParserBase.java:303)
at net.minidev.json.parser.JSONParserBase.parse(JSONParserBase.java:154)
at net.minidev.json.parser.JSONParserString.parse(JSONParserString.java:55)
at net.minidev.json.parser.JSONParserString.parse(JSONParserString.java:37)
at net.minidev.json.parser.JSONParser.parse(JSONParser.java:135)
at com.jayway.jsonpath.spi.impl.JsonSmartJsonProvider.parse(JsonSmartJsonProvider.java:58)
at com.jayway.jsonassert.JsonAssert.with(JsonAssert.java:37)

As far as I can see the net.minidev.json.parser.JSONParser isn't thread-safe so the assertions shouldn't use the same parser instance.