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/11/07 09:59:32 UTC

[sling-org-apache-sling-resourcemerger] 15/23: SLING-3909 : Merged ResourceProviders should be optionally modifiable

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resourcemerger-1.2.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourcemerger.git

commit 380a3e0d45506f2c13d0e02fee0baff69f4cbb71
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Sep 16 13:50:22 2014 +0000

    SLING-3909 : Merged ResourceProviders should be optionally modifiable
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resourcemerger@1625285 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/resourcemerger/impl/CRUDMergingResourceProvider.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/resourcemerger/impl/CRUDMergingResourceProvider.java b/src/main/java/org/apache/sling/resourcemerger/impl/CRUDMergingResourceProvider.java
index 3446dc0..88058d9 100644
--- a/src/main/java/org/apache/sling/resourcemerger/impl/CRUDMergingResourceProvider.java
+++ b/src/main/java/org/apache/sling/resourcemerger/impl/CRUDMergingResourceProvider.java
@@ -63,8 +63,9 @@ public class CRUDMergingResourceProvider
             holder.count++;
             if ( holder.count == 1 ) {
                 holder.lowestResourcePath = rsrc.getPath();
+            } else if ( holder.count == 2 ) {
+                holder.highestResourcePath = rsrc.getPath();
             }
-            holder.highestResourcePath = rsrc.getPath();
             if ( !ResourceUtil.isNonExistingResource(rsrc) ) {
                 // check parent for hiding
                 final Resource parent = rsrc.getParent();
@@ -94,7 +95,7 @@ public class CRUDMergingResourceProvider
         if ( mountResource != null ) {
             throw new PersistenceException("Resource at " + path + " already exists.", null, path, null);
         }
-        // creating of the root mount resource is not supported
+        // creation of the root mount resource is not supported
         final String relativePath = getRelativePath(path);
         if ( relativePath == null || relativePath.length() == 0 ) {
             throw new PersistenceException("Resource at " + path + " can't be created.", null, path, null);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.