reschke commented on code in PR #184:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/184#discussion_r2128958701


##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/AliasHandler.java:
##########
@@ -469,27 +469,17 @@ private boolean loadAlias(
             log.warn("containingResource is null for alias on {}, skipping.", 
resource.getPath());
             return false;
         } else {
-            Resource parent = containingResource.getParent();
-
-            if (parent == null) {
-                log.warn(
-                        "{} is null for alias on {}, skipping.",
-                        containingResource == resource ? "parent" : 
"grandparent",
-                        resource.getPath());
+            String[] aliasArray = 
resource.getValueMap().get(ResourceResolverImpl.PROP_ALIAS, String[].class);

Review Comment:
   it's correct.
   
   containingResource != resource if and only if resource is a jcr:content 
resource.
   
   In which case we read the aliases on jcr:content, and apply them to the 
container.
   
   (and yes, alignment with the cached case is coming as well, that's a 
different PR)
   
   Will add some comments so this becomes clearer.



-- 
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