akankshajain18 commented on a change in pull request #24:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r545787697
##########
File path:
src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java
##########
@@ -306,27 +307,29 @@ protected void activate(final BundleContext
bundleContext, final ResourceResolve
}
// optimize alias path allow list
- this.aliasPathAllowList.clear();
String[] aliasPathPrefix =
config.resource_resolver_allowed_alias_locations();
if ( aliasPathPrefix != null ) {
+ final Set<String> prefixSet = new TreeSet<>();
for(final String prefix : aliasPathPrefix) {
String value = prefix.trim();
- if (!value.isEmpty()&&value.startsWith("/")) { // absolute
path should be given
- if (value.endsWith("/")) {
- this.aliasPathAllowList.add(value);
- } else {
- this.aliasPathAllowList.add(value + "/");
- }
+ if (!value.isEmpty()) {
Review comment:
Check is required, Will update PR along with warning message
----------------------------------------------------------------
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:
[email protected]