You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:26:28 UTC
[sling-org-apache-sling-nosql-couchbase-resourceprovider] 22/42:
SLING-4381/SLING-5024 fix root node child listing
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-couchbase-resourceprovider.git
commit 80352d7a754d8f14ce383d0178ccdcb379f7e92e
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 16 19:25:11 2015 +0000
SLING-4381/SLING-5024 fix root node child listing
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1703453 13f79535-47bb-0310-9956-ffa450edef68
---
.../nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlAdapter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlAdapter.java b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlAdapter.java
index fd4a798..5a699a9 100644
--- a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlAdapter.java
+++ b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlAdapter.java
@@ -97,7 +97,7 @@ public final class CouchbaseNoSqlAdapter extends AbstractNoSqlAdapter {
public Iterator<NoSqlData> getChildren(String parentPath) {
Bucket bucket = couchbaseClient.getBucket();
// fetch all direct children of this path
- Pattern directChildren = Pattern.compile("^" + parentPath + "/[^/]+$");
+ Pattern directChildren = Pattern.compile("^" + StringUtils.removeEnd(parentPath, "/") + "/[^/]+$");
N1qlQuery query = N1qlQuery.simple(select("*")
.from(couchbaseClient.getBucketName())
.where("REGEXP_LIKE(`" + PN_PATH + "`, '" + directChildren.pattern() + "')"),
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.