Skip to content

JCRVLT-830 check if a subfolder can be removed#416

Draft
joerghoh wants to merge 10 commits intomasterfrom
JCRVLT-830-2
Draft

JCRVLT-830 check if a subfolder can be removed#416
joerghoh wants to merge 10 commits intomasterfrom
JCRVLT-830-2

Conversation

@joerghoh
Copy link
Copy Markdown
Contributor

Implemented some additional checks to prevent the removal of unexpected files.

@joerghoh joerghoh requested a review from kwin February 26, 2026 13:52
return false;
}
}
NodeIterator children = node.getNodes();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For performance reason I wouldn't iterate over all properties/children from the repo but just over all filter rules. That is enough to determine the outcome and should be way faster....

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so you mean, that if the node is not affected, any childnode of it (and their properties) cannot be affected as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A filter without includes/excludes always covers everything below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what about a filter with includes and excludes? In that case we would need to iterate down the tree...

(given the frequency at which filters without includes and excludes occur, I can definitely add a shortcut without repo access.)

@joerghoh
Copy link
Copy Markdown
Contributor Author

I made this feature configurable via OSGI. That should be only a temporary measure until we are sure that there are no side-effects. But it required a series of changes to otherwise unrelated classes to pass on that flag.

I added the OSGI property to both the FSPackageRegistry and the JcrPackageRegistry. Default is to have this feature enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants