[
https://issues.apache.org/jira/browse/JCRVLT-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tobias Bocanegra resolved JCRVLT-81.
------------------------------------
Resolution: Fixed
Fix Version/s: 3.1.16
Assignee: Tobias Bocanegra
fixed in r1661014
> FilterSet.equals is returning true for filter sets with distinct roots
> ----------------------------------------------------------------------
>
> Key: JCRVLT-81
> URL: https://issues.apache.org/jira/browse/JCRVLT-81
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Affects Versions: 3.1.14
> Reporter: Konrad Windszus
> Assignee: Tobias Bocanegra
> Fix For: 3.1.16
>
>
> Currently FilterSet equals will return true if either the instances are the
> same or all entries are the same
> (https://github.com/apache/jackrabbit-filevault/blob/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/api/FilterSet.java#L259).
> This is not sufficient because there may be multiple distinct filter sets
> which do not have any entries but rather only the implicit whitelist entry
> but distinct roots. All those FilterSets are considered equal.
> One example is
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <workspaceFilter version="1.0">
> <filter root="/content/test1" />
> <filter root="/content/test2" />
> </workspaceFilter>
> {code}
> Also the hashCode is implemented very ineffeciently (alway returning 0) which
> will lead to degraded performance e.g. when using Maps.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)