You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "enapps-enorman (via GitHub)" <gi...@apache.org> on 2023/05/10 17:49:55 UTC

[GitHub] [sling-org-apache-sling-testing-jcr-mock] enapps-enorman commented on a diff in pull request #20: SLING-11868 jcr-mock: MockAuthorizable must not use java.nio.file.Paths

enapps-enorman commented on code in PR #20:
URL: https://github.com/apache/sling-org-apache-sling-testing-jcr-mock/pull/20#discussion_r1190229377


##########
src/main/java/org/apache/sling/testing/mock/jcr/MockAuthorizable.java:
##########
@@ -67,7 +66,7 @@ abstract class MockAuthorizable implements Authorizable {
                 intermediatePath = "/home/users"; // NOSONAR
             }
         }
-        this.path = Paths.get(intermediatePath, this.id).toString();
+        this.path = intermediatePath + "/" + this.id;

Review Comment:
   Sorry about that.  
   
   How about using something like org.apache.jackrabbit.oak.commons.PathUtils.concat(intermediatePath, this.id)  to improve the readability and provide some protection against illegal arguments?



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