[
https://issues.apache.org/jira/browse/JCRVLT-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518137#comment-16518137
]
Marius Petria edited comment on JCRVLT-305 at 6/20/18 2:40 PM:
---------------------------------------------------------------
[~tripod] as I said in my previous comment the following code produces a
filter.xml that does not contains any include clause (and also any exclude
clause). It will just containĀ {{<filter root="/tmp"/>}}. Does this lack of
patterns affect the import in any way?
{code:java}
PathFilterSet nodes = new PathFilterSet("/tmp");
nodes.addInclude(new DefaultPathFilter("/tmp"));
PathFilterSet props = new PathFilterSet("/tmp");
DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
filter.add(nodes, props);
{code}
I added some more test to [1] that show that if a path is fist included and
then excluded by another pattern the last matching pattern is not used (as
described in documentation: the last matching element determines if the path is
included or not). I think the problem is that filter.xml in generateSource uses
only the propFilterSet hence now pattern from the nodes are added to the
filter.xml.
[1]
https://github.com/apache/jackrabbit-filevault/compare/trunk...mpetria:issue/JCRVLT-305?expand=1
was (Author: mpetria):
[~tripod] as I said in my previous comment the following code produces a
filter.xml that does not contains any include clause (and also any exclude
clause). It will just containĀ {{<filter root="/tmp"/>}}. Does this lack of
patterns affect the import in any way?
{code:java}
PathFilterSet nodes = new PathFilterSet("/tmp");
nodes.addInclude(new DefaultPathFilter("/tmp"));
PathFilterSet props = new PathFilterSet("/tmp");
DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
filter.add(nodes, props);
{code}
> DefaultWorkspaceFilter.add(nodeFilters) does not include properties
> -------------------------------------------------------------------
>
> Key: JCRVLT-305
> URL: https://issues.apache.org/jira/browse/JCRVLT-305
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Reporter: Marius Petria
> Priority: Major
>
> The add method should only add the filter set to nodeFilterSets, otherwise an
> include pattern for nodes will reject all properties.
> {code}
> public void add(PathFilterSet set) {
> nodesFilterSets.add(set);
> propsFilterSets.add(set);
> }
> {code}
> [1]
> https://github.com/apache/jackrabbit-filevault/blob/9eb53d36adfb7695a44075c72ca7ff0cedafabcc/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/config/DefaultWorkspaceFilter.java#L102
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)