Bertrand Delacretaz created SLING-4345:
------------------------------------------
Summary: RootResourceProviderEntry iterator causes infinite loop
Key: SLING-4345
URL: https://issues.apache.org/jira/browse/SLING-4345
Project: Sling
Issue Type: Bug
Components: ResourceResolver
Reporter: Bertrand Delacretaz
This causes the FullTextIndexingTest and JsonQueryServletTest integration tests
to go into infinite loops.
Steps to reproduce:
{code}
cd launchpad/testing
mvn clean launchpad:run
# in another console
curl -u admin:admin -Ftitle=foo http://localhost:8888/tmp/foo
curl -s
"http://localhost:8888/JsonQueryServletTest_1421946840413.query.tidy.json?queryType=xpath&statement=//tmp/foo"
[{
"name": "foo",
"jcr:path": "/tmp/foo",
"jcr:score": 1000,
"jcr:primaryType": "nt:unstructured"
},{
"name": "foo",
"jcr:path": "/tmp/foo",
"jcr:score": 1000,
"jcr:primaryType": "nt:unstructured"
},{
"name": "foo",
"jcr:path": "/tmp/foo",
"jcr:score": 1000,
"jcr:primaryType": "nt:unstructured"
},{
...
{code}
The unique query result is returned in an infinite loop.
The cause seems to be the new Iterator<Resource>() created in line 132 of
RootResourceProviderEntry.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)