[ 
https://issues.apache.org/jira/browse/SLING-5276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14995746#comment-14995746
 ] 

Oliver Lietz commented on SLING-5276:
-------------------------------------

test added in r1713280

{noformat}
testSLING_5276(org.apache.sling.commons.json.util.ValidatorTest)  Time elapsed: 
0.021 sec  <<< ERROR!
java.lang.Exception: Unexpected exception, 
expected<org.apache.sling.commons.json.JSONException> but 
was<java.lang.StackOverflowError>
        at 
org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:28)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.StackOverflowError: null
        at 
org.apache.sling.commons.json.util.Validator.validate(Validator.java:52)
        at 
org.apache.sling.commons.json.util.Validator.validate(Validator.java:70)
        [...]
        at 
org.apache.sling.commons.json.util.Validator.validate(Validator.java:70)


Results :

Tests in error: 
  ValidatorTest.testSLING_5276 ยป  Unexpected exception, 
expected<org.apache.slin...

Tests run: 70, Failures: 0, Errors: 1, Skipped: 0
{noformat}

> Validator.validate throws StackOverflowError
> --------------------------------------------
>
>                 Key: SLING-5276
>                 URL: https://issues.apache.org/jira/browse/SLING-5276
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons JSON 2.0.14
>         Environment: Linux
>            Reporter: Krzysztof Otrebski
>            Priority: Critical
>
> If I pass string "[" to org.apache.sling.commons.json.util.Validator.validate 
> I will get  StackOverflowError



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to