[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-29 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770368#comment-17770368
 ] 

Julian Reschke commented on SLING-12025:


bq. Actually, when checking closer, the aliasing is not working at all, if the 
optimizedAliasing is not turned on...

Care to elaborate? :-)

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Assignee: Joerg Hoh
>Priority: Major
> Fix For: Resource Resolver 1.11.2
>
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-29 Thread Joerg Hoh (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17770327#comment-17770327
 ] 

Joerg Hoh commented on SLING-12025:
---

Actually, when checking closer, the aliasing is not working at all, if the 
optimizedAliasing is not turned on...

I adjusted the test and made it pass in all cases, to document this behavior.

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Priority: Major
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-18 Thread Joerg Hoh (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766242#comment-17766242
 ] 

Joerg Hoh commented on SLING-12025:
---

The optimized alias resolution is turned on by default for quite some time 
(last change in 2016 when the configuration has been migrated), so I would 
assume that this behavior should be considered as correct.
And the case for the non-optimized resolution is a bug.

(Which also raises the question: Does it make sense to maintain the 
non-optimized codepath at all, if it's turned off by default and this 
inconsistent behavior has not been detected for the last 6+ years.)

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Priority: Major
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (SLING-12025) ResourceResolver: different mapping when optimizedAliasResolution enabled

2023-09-17 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/SLING-12025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17766203#comment-17766203
 ] 

Julian Reschke commented on SLING-12025:


I agree that the behaviour needs to be the same.

I disagree that special-casing jcr:content is usefuly, but it's unlikely that 
we can remove that as "feature".

> ResourceResolver: different mapping when optimizedAliasResolution enabled
> -
>
> Key: SLING-12025
> URL: https://issues.apache.org/jira/browse/SLING-12025
> Project: Sling
>  Issue Type: Task
>  Components: ResourceResolver
>Affects Versions: Resource Resolver 1.10.0
>Reporter: Joerg Hoh
>Priority: Major
>
> I found that the there is a different behavior in case the "optimized alias 
> resolution is enabled.
> Setup:
> {noformat}
> * /content/jcr:content
>   + sling:alias=foobar
> {noformat}
> In my opinion the expected behavior is that the {{content}} resource is 
> aliased and can be resolved via both {{/content}} and {{/foobar}}. You cannot 
> alias the {{jcr:content}} node. Unfortunately there are no unit tests for 
> that, and I just came across that behavior when I tried to write one.
> This works with the "optimized alias resolution" feature turned on, but if 
> it's turned off, it does not work anymore, and you can resolve that resource 
> only via its name. (In that case I assume that the jcr:content resource is 
> aliased.)
> I created 
> https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/105 to 
> demonstrate this problem.
> Is my assumption about the behavior correct?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)