stleary / JSON-java

A reference implementation of a JSON package in Java.
http://stleary.github.io/JSON-java/index.html
Other
4.54k stars 2.56k forks source link

Fix JSONArrayTest testRecursiveDepthArrayFor1000Levels() #855

Closed stleary closed 9 months ago

stleary commented 9 months ago

Description JSONArrayTest testRecursiveDepthArrayFor1000Levels() has been failing intermittently in the Java 11 compile/test step. Recently it started failing continuously. This change catches and ignores the StackOverflowError only when running with Java 11.

Refactoring None

Testing done Confirmed expected results with Java 11 and other Java versions

Note Currently none of the other recursive depth tests are failing, but similar changes may be made if they do start occurring.

stleary commented 9 months ago

What problem does this code solve? Intermittent StackOverflowError test failures when running with Java 11.

Does the code still compile with Java6? Yes

Risks Low

Changes to the API? No

Will this require a new release? No

Should the documentation be updated? No

Does it break the unit tests? No, it fixes an intermittently failing unit test

Was any code refactored in this commit? No

Review status APPROVED - by myself

Starting 3-day comment window