Author: cziegeler
Date: Tue Jul 9 07:22:16 2013
New Revision: 1501115
URL: http://svn.apache.org/r1501115
Log:
SLING-2913 : Issue in AbstractCreateOperation#deepGetOrCreateNode . Apply
patch from Antonio Sanso
Modified:
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java
Modified:
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java?rev=1501115&r1=1501114&r2=1501115&view=diff
==============================================================================
---
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java
(original)
+++
sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/AbstractCreateOperation.java
Tue Jul 9 07:22:16 2013
@@ -472,6 +472,9 @@ abstract class AbstractCreateOperation e
while (startingResource == null) {
if (startingResourcePath.equals("/")) {
startingResource = resolver.getResource("/");
+ if (startingResource == null){
+ throw new PersistenceException("Access denied for root
resource, resource can't be created: " + path);
+ }
} else if (resolver.getResource(startingResourcePath) != null) {
startingResource = resolver.getResource(startingResourcePath);
updateNodeType(resolver, startingResourcePath, reqProperties,
changes, versioningConfiguration);