You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Andrew Khoury (JIRA)" <ji...@apache.org> on 2015/08/24 03:39:46 UTC

[jira] [Created] (SLING-4962) getNodes() always returns empty iterator for root node

Andrew Khoury created SLING-4962:
------------------------------------

             Summary: getNodes() always returns empty iterator for root node
                 Key: SLING-4962
                 URL: https://issues.apache.org/jira/browse/SLING-4962
             Project: Sling
          Issue Type: Bug
          Components: Testing
    Affects Versions: Testing JCR Mock 1.1.8
            Reporter: Andrew Khoury


session.getRootNode().getNodes() always returns an empty iterator even when there are nodes in the MockJcr session.

For example in the below code, s.getRootNode.getNodes().hasNext() returns false:
{code:none}
Session s = JcrMock.newSession();
s.getRootNode().addNode("foo");
s.getRootNode.getNodes().hasNext()
{code}

I attached a patch containing a test case and a fix.



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