JCRVLT-830 check if a subfolder can be removed#416
Conversation
|
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. |
|
The initial focus for the review should be to make sure that the existing behavior (which can delete content unintentionally) can be preserved with the correct configuration. I understand that that adding this configuration increases the size of the change quite a bit, so I wonder if a system property (or env variable) would be a better solution to keep the change smaller. |
...would it avoid changes in APIs thus package versions? |
| } | ||
| PropertyIterator props = node.getProperties(); | ||
| while (props.hasNext()) { | ||
| Property prop = props.nextProperty(); |
There was a problem hiding this comment.
Don't we need to check all properties here?
I'll assume this is correct, so maybe add a short comment here?
There was a problem hiding this comment.
I don't understand; the code iterates over all properties here.
| return isSubtreeFullyOverwrittenRecursive(subTree); | ||
| } | ||
|
|
||
| private boolean isSubtreeFullyOverwrittenRecursive(javax.jcr.Node node) throws RepositoryException { |
There was a problem hiding this comment.
as this one is something the first one descends into, should't the method names be consistent?
| } | ||
| NodeIterator children = node.getNodes(); | ||
| while (children.hasNext()) { | ||
| if (!isSubtreeFullyOverwrittenRecursive(children.nextNode())) { |
There was a problem hiding this comment.
Hmmm. What about large collections?
There was a problem hiding this comment.
I think that there is no way to avoid iterating all children. But that's a good point, I need to re-evaluate again under which circumstances this code is executed at all.
|
Those suffer from vulnerabilities which otherwise lead to false positives with dependency-checker.
Add suppressed exceptions for every failed attempt. Log package id.
Giving an example of filters with overlapping paths Recommend against overlapping roots
Clarified runtime vs build prerequisites
This minimizes interruption of ongoing work in the IDE and with the CLI as one can easily leave that phase out (if not desired).
Some have incorrectly been targeted for the skipped version 3.8.6. Fix formatting



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