kwin commented on code in PR #60:
URL: 
https://github.com/apache/sling-org-apache-sling-api/pull/60#discussion_r2121703787


##########
src/main/java/org/apache/sling/api/resource/SyntheticResource.java:
##########
@@ -43,8 +43,9 @@ public class SyntheticResource extends AbstractResource {
      * Creates a synthetic resource with the given <code>path</code> and
      * <code>resourceType</code>.
      * @param resourceResolver The resource resolver
-     * @param path The resource path
+     * @param path The absolute resource path including the name. Make sure 
that each segment of the path only contains valid characters in Sling API 
resource names.

Review Comment:
   I would tend to throw an IllegalArgumentException already from the 
constructor if the given path is invalid (i.e. cannot be normalized with 
`ResourceUtil.normalize(...)`). That way we could also get rid at the getName() 
returning something like "INVALID".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to