henrykuijpers commented on a change in pull request #46: URL: https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/46#discussion_r644637033
########## File path: src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java ########## @@ -1032,34 +1070,33 @@ private boolean addEntry(final Map<String, List<MapEntry>> entryMap, final Strin /* * Update alias query based on configured alias locations */ - private String updateAliasQuery(){ + private String createAliasQuery(){ final Set<String> allowedLocations = this.factory.getAllowedAliasLocations(); - StringBuilder baseQuery = new StringBuilder(ALIAS_BASE_QUERY_DEFAULT); - baseQuery.append(" ").append("WHERE"); + StringBuilder query = new StringBuilder(ALIAS_BASE_QUERY_DEFAULT); + query.append(" ").append("WHERE"); if(allowedLocations.isEmpty()){ - String jcrSystemPath = StringUtils.removeEnd(JCR_SYSTEM_PREFIX, "/"); - baseQuery.append(" ").append("(").append("NOT ISDESCENDANTNODE(page,") - .append("\"").append(jcrSystemPath).append("\"").append("))"); + query.append(" ").append("(").append("NOT ISDESCENDANTNODE(page,") + .append("\"").append(JCR_SYSTEM_PATH).append("\"").append("))"); Review comment: Agree, I'll do that. I tried to touch as less as possible, but I very much agree with this. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org