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:47 UTC

[sling-org-apache-sling-resourceresolver] 17/47: SLING-2530 : Implement CRUD based on resources

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

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

commit d022f3e0019cbf613c754e0037c47a73dac913ae
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Jul 25 16:03:33 2012 +0000

    SLING-2530 : Implement CRUD based on resources
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver@1365652 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
index 5064da7..6f51254 100644
--- a/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
+++ b/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
@@ -1022,6 +1022,10 @@ public class ResourceResolverImpl extends SlingAdaptable implements ResourceReso
         if ( name == null ) {
             throw new NullPointerException("name");
         }
+        // name should be a name not a path
+        if ( name.indexOf("/") != -1 ) {
+            throw new PersistenceException("Name should not contain a slash: " + name, null, parent.getPath(), null);
+        }
         final String path;
         if ( parent.getPath().equals("/") ) {
             path = parent.getPath() + name;

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