You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "reschke (via GitHub)" <gi...@apache.org> on 2026/08/12 11:14:52 UTC

[PR] SLING-13301: test syntax variants [sling-org-apache-sling-resourceresolver]

reschke opened a new pull request, #228:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/228

   (no comment)


-- 
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-unsubscribe@sling.apache.org

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


Re: [PR] SLING-13301: test syntax variants [sling-org-apache-sling-resourceresolver]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #228:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/228#issuecomment-5265985771

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228&metric=new_duplicated_lines_density&view=list)  
     
   <!-- sqra-placement-anchor -->
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-resourceresolver&pullRequest=228)
   
   


-- 
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-unsubscribe@sling.apache.org

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


Re: [PR] SLING-13301: test syntax variants [sling-org-apache-sling-resourceresolver]

Posted by "joerghoh (via GitHub)" <gi...@apache.org>.
joerghoh commented on code in PR #228:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/228#discussion_r3765884397


##########
src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java:
##########
@@ -267,6 +267,66 @@ public void test_simple_vanity_path() {
         assertNotNull(vanityMap.get("/" + containerName + "/" + oneMore));
     }
 
+    // see https://issues.apache.org/jira/browse/SLING-13301
+    @Test
+    public void test_syntax_variants() {
+        // absolute path
+        internal_test_syntax_variants("/x", "/x");
+        // relative path
+        internal_test_syntax_variants("x", "/x");
+        // multi-segment absolute path
+        internal_test_syntax_variants("/x/y", "/x/y");
+        // multi-segment relative path
+        internal_test_syntax_variants("x/y", "/x/y");
+        // multi-segment absolute path starting with "//"
+        internal_test_syntax_variants("//x//y", "//x//y");
+        // multi-segment absolute path starting with "/.."
+        internal_test_syntax_variants("/../x", "/../x");
+        // blank path
+        internal_test_syntax_variants(" ", null);
+        // empty path
+        internal_test_syntax_variants("", null);
+    }
+
+    private void internal_test_syntax_variants(String vanityPath, String expectation) {

Review Comment:
   ```suggestion
       private void assertPathResolvesTo(String vanityPath, String expectedPath) {
   ```



-- 
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-unsubscribe@sling.apache.org

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


Re: [PR] SLING-13301: test syntax variants [sling-org-apache-sling-resourceresolver]

Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke merged PR #228:
URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/228


-- 
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-unsubscribe@sling.apache.org

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