incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1365652 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
Date Wed, 25 Jul 2012 16:03:33 GMT
Author: cziegeler
Date: Wed Jul 25 16:03:33 2012
New Revision: 1365652

URL: http://svn.apache.org/viewvc?rev=1365652&view=rev
Log:
SLING-2530 : Implement CRUD based on resources

Modified:
    sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java

Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java?rev=1365652&r1=1365651&r2=1365652&view=diff
==============================================================================
--- sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
(original)
+++ sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverImpl.java
Wed Jul 25 16:03:33 2012
@@ -1022,6 +1022,10 @@ public class ResourceResolverImpl extend
         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;



Mime
View raw message