You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2026/01/15 10:16:41 UTC
(jackrabbit-filevault) branch exp-831 created (now 57a07a52)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a change to branch exp-831
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
at 57a07a52 JCRVLT-831: another prototype
This branch includes the following new commits:
new 57a07a52 JCRVLT-831: another prototype
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-filevault) 01/01: JCRVLT-831: another prototype
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch exp-831
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
commit 57a07a52990d55273b44f1dcb39c582644b7fdc6
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Thu Jan 15 11:16:20 2026 +0100
JCRVLT-831: another prototype
---
.../vault/fs/impl/io/DocViewSaxFormatterIT.java | 22 ++++++++++------------
.../jackrabbit/vault/fs/impl/AggregateImpl.java | 5 ++++-
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSaxFormatterIT.java b/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSaxFormatterIT.java
index 88eb96fc..579107da 100644
--- a/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSaxFormatterIT.java
+++ b/vault-core-it/vault-core-integration-tests/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewSaxFormatterIT.java
@@ -19,21 +19,15 @@
package org.apache.jackrabbit.vault.fs.impl.io;
import javax.jcr.GuestCredentials;
-import javax.jcr.ItemExistsException;
import javax.jcr.Node;
-import javax.jcr.PathNotFoundException;
import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.Value;
import javax.jcr.ValueFactory;
-import javax.jcr.lock.LockException;
-import javax.jcr.nodetype.ConstraintViolationException;
-import javax.jcr.nodetype.NoSuchNodeTypeException;
import javax.jcr.nodetype.NodeType;
import javax.jcr.security.AccessControlManager;
import javax.jcr.security.Privilege;
-import javax.jcr.version.VersionException;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -210,26 +204,30 @@ public class DocViewSaxFormatterIT extends IntegrationTestBase {
}
@Test
- public void testEmptyOrderNodes()
- throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException,
- ConstraintViolationException, RepositoryException, URISyntaxException, IOException {
+ public void testEmptyOrderNodes() throws RepositoryException, URISyntaxException, IOException {
+
+ NamespaceHelper nh = new NamespaceHelper(admin);
+ nh.registerNamespace("foo1", "bar1:");
+
// orderable child nodes
+ // two sibling nodes, one of which in a custom namespace not used anywhere else
Node node = JcrUtils.getOrCreateByPath("/testroot", NodeType.NT_UNSTRUCTURED, admin);
node.addNode("child1", NodeType.NT_UNSTRUCTURED);
node.addNode("child2", NodeType.NT_UNSTRUCTURED);
- node.addNode("child3", NodeType.NT_UNSTRUCTURED);
+ node.addNode("foo1:child3", NodeType.NT_UNSTRUCTURED);
admin.save();
String serialization = getSerializedAggregate(admin, "/testroot/child2", "testroot");
+ // sibling nodes of child2 need to appear as empty nodes even when outside the filter(s)
assertEquals(
"valid xml",
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- + "<jcr:root xmlns:jcr=\"http://www.jcp.org/jcr/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"\n"
+ + "<jcr:root xmlns:jcr=\"http://www.jcp.org/jcr/1.0\" xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\" xmlns:foo1=\"bar1:\"\n"
+ " jcr:primaryType=\"nt:unstructured\">\n"
+ " <child1/>\n"
+ " <child2 jcr:primaryType=\"nt:unstructured\"/>\n"
- + " <child3/>\n"
+ + " <foo1:child3/>\n"
+ "</jcr:root>\n",
serialization);
}
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
index 9e4b3a06..32e74141 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateImpl.java
@@ -645,7 +645,10 @@ public class AggregateImpl implements Aggregate {
addNamespace(prefixes, p);
}
}
- for (NodeIterator iter = node.getNodes(); iter.hasNext(); ) {
+ NodeIterator iter = node.getPrimaryNodeType().hasOrderableChildNodes()
+ ? node.getNodes()
+ : getNodeIteratorFor(node, mgr.getWorkspaceFilter());
+ while (iter.hasNext()) {
Node c = iter.nextNode();
String relPath = parentPath + "/" + c.getName();
if (includes(relPath)) {