restore-lenient-jsonarray fix some sonarcube issues
This commit is contained in:
@@ -1557,9 +1557,9 @@ public class JSONArrayTest {
|
|||||||
JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration();
|
JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration();
|
||||||
if (jsonParserConfiguration.isStrictMode()) {
|
if (jsonParserConfiguration.isStrictMode()) {
|
||||||
try {
|
try {
|
||||||
JSONArray jsonArray = new JSONArray(str);
|
new JSONArray(str);
|
||||||
fail("Expected to throw exception due to invalid string");
|
fail("Expected to throw exception due to invalid string");
|
||||||
} catch (JSONException e) { }
|
} catch (JSONException e) { /* no action is needed here */ }
|
||||||
} else {
|
} else {
|
||||||
JSONArray jsonArray = new JSONArray(str);
|
JSONArray jsonArray = new JSONArray(str);
|
||||||
assertEquals("JSONArray in non-strictMode should contain a null entry",
|
assertEquals("JSONArray in non-strictMode should contain a null entry",
|
||||||
|
|||||||
Reference in New Issue
Block a user