kwin commented on a change in pull request #3:
URL:
https://github.com/apache/sling-org-apache-sling-resourcemerger/pull/3#discussion_r589297188
##########
File path:
src/main/java/org/apache/sling/resourcemerger/impl/MergingResourceProvider.java
##########
@@ -110,17 +110,14 @@ public ParentHidingHandler(final Resource parent, final
boolean traverseParent)
final String[] ancestorChildrenToHideArray =
ancestorProps.get(MergedResourceConstants.PN_HIDE_CHILDREN, String[].class);
if (ancestorChildrenToHideArray != null) {
for (final String value : ancestorChildrenToHideArray)
{
- final boolean onlyUnderlying;
- if (value.equals("*")) {
- onlyUnderlying = true;
- } else {
- onlyUnderlying = false;
- }
+ final boolean onlyUnderlying = value.equals("*");
final ExcludeEntry entry = new ExcludeEntry(value,
onlyUnderlying);
// check if this entry is applicable at all
(always assuming the worst case, i.e. non local resource)
final Boolean hides = hides(entry,
previousAncestorName, false);
- if (hides != null && hides.booleanValue() == true)
{
- this.entries.add(new ExcludeEntry("*",
entry.onlyUnderlying));
+ if (hides != null) {
Review comment:
Please look at the alternative approach from
https://github.com/apache/sling-org-apache-sling-resourcemerger/pull/4.
----------------------------------------------------------------
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]