From ad26e94274bfae929d1805d8e25c82fad8c06691 Mon Sep 17 00:00:00 2001 From: Sean Leary Date: Mon, 15 Jun 2026 20:56:17 -0500 Subject: [PATCH] restore-lenient-jsonarray fix some sonarcube issues --- src/test/java/org/json/junit/JSONArrayTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/json/junit/JSONArrayTest.java b/src/test/java/org/json/junit/JSONArrayTest.java index 3761dd9..c54b617 100644 --- a/src/test/java/org/json/junit/JSONArrayTest.java +++ b/src/test/java/org/json/junit/JSONArrayTest.java @@ -1557,9 +1557,9 @@ public class JSONArrayTest { JSONParserConfiguration jsonParserConfiguration = new JSONParserConfiguration(); if (jsonParserConfiguration.isStrictMode()) { try { - JSONArray jsonArray = new JSONArray(str); + new JSONArray(str); fail("Expected to throw exception due to invalid string"); - } catch (JSONException e) { } + } catch (JSONException e) { /* no action is needed here */ } } else { JSONArray jsonArray = new JSONArray(str); assertEquals("JSONArray in non-strictMode should contain a null entry",