angela created OAK-612: -------------------------- Summary: Calling addNode on a node that has orderable child nodes violates specification Key: OAK-612 URL: https://issues.apache.org/jira/browse/OAK-612 Project: Jackrabbit Oak Issue Type: Bug Components: core, jcr Reporter: angela
it seems to me that the current behavior of Node.addNode for a node that has orderable child nodes violates the specification (section 23.3): {quote} 23.3 Adding a New Child Node When a child node is added to a node that has orderable child nodes it is added to the end of the list. {quote} however, the following test will fail: {code} @Test public void testAddNode() throws Exception { new TestContentLoader().loadTestContent(getAdminSession()); Session session = getAdminSession(); Node test = session.getRootNode().addNode("test", "test:orderableFolder"); assertTrue(test.getPrimaryNodeType().hasOrderableChildNodes()); Node n1 = test.addNode("a"); Node n2 = test.addNode("b"); session.save(); NodeIterator it = test.getNodes(); assertEquals("a", it.nextNode().getName()); assertEquals("b", it.nextNode().getName()); } {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira