more sonarcube optimization in jsonobject.java

This commit is contained in:
marilynel
2025-09-07 12:41:37 -08:00
parent 4e0f62b1a6
commit 53cfa742a7
2 changed files with 28 additions and 7 deletions

View File

@@ -3896,8 +3896,8 @@ public class JSONObjectTest {
@Test
public void issue743SerializationMapWith1000Objects() {
HashMap<String, Object> map = buildNestedMap(1000);
JSONParserConfiguration parserConfiguration = new JSONParserConfiguration().withMaxNestingDepth(1000);
HashMap<String, Object> map = buildNestedMap(500);
JSONParserConfiguration parserConfiguration = new JSONParserConfiguration().withMaxNestingDepth(500);
JSONObject object = new JSONObject(map, parserConfiguration);
String jsonString = object.toString();
}