akankshajain18 commented on a change in pull request #24:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r534947261
##########
File path:
src/main/java/org/apache/sling/resourceresolver/impl/CommonResourceResolverFactoryImpl.java
##########
@@ -472,6 +466,19 @@ public boolean hasVanityPathPrecedence() {
return configs;
}
+ @Override
+
+ public CopyOnWriteArrayList<String> getAllowedAliasPaths() {
Review comment:
@wimsymons
the idea to return an immutable list is every time the unmodifiable list
will be returned and not affected by configuration changes. After getting all
allowed list we need to sort the paths in (` public List<String>
getAllowedAliasPaths() ` ), this way we are creating a modifiable list once
again
` List<String> sortedList =
immutablelist.stream().sorted().collect(Collectors.toList());`
On other hand sorting paths in the activate method will not be advisable as
the activate method should do the minimum required work.
Please suggest
----------------------------------------------------------------
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]