incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r709109 - /incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
Date Thu, 30 Oct 2008 08:02:35 GMT
Author: fmeschbe
Date: Thu Oct 30 01:02:35 2008
New Revision: 709109

URL: http://svn.apache.org/viewvc?rev=709109&view=rev
Log:
SLING-588 Do not cut off potential selectors and extension
from the URL used to create a new resource

Modified:
    incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java

Modified: incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java?rev=709109&r1=709108&r2=709109&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
(original)
+++ incubator/sling/trunk/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
Thu Oct 30 01:02:35 2008
@@ -28,11 +28,11 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
 
 import org.apache.sling.api.SlingException;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.request.RequestParameter;
+import org.apache.sling.api.resource.NonExistingResource;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.servlets.HtmlResponse;
@@ -127,7 +127,8 @@
 
             // cut off any selectors/extension from the suffix
             int dotPos = suffix.indexOf('.');
-            if (dotPos > 0) {
+            if ((dotPos > 0)
+                && (!(currentResource instanceof NonExistingResource))) {
                 suffix = suffix.substring(0, dotPos);
             }
 



Mime
View raw message