[ https://issues.apache.org/jira/browse/OCM-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maxim Zinal updated OCM-68: --------------------------- Attachment: OCM-68.patch This is my patch fixing the issue > Incorrect behaviour of Filter.addOrFilter() method > -------------------------------------------------- > > Key: OCM-68 > URL: https://issues.apache.org/jira/browse/OCM-68 > Project: Jackrabbit OCM > Issue Type: Bug > Affects Versions: 2.0.0, 2.0.1 > Environment: Oracle JDK 7 > Reporter: Maxim Zinal > Fix For: 2.0.1 > > Attachments: OCM-68.patch > > > I've tried to use Filter.addOrFilter() method and found that it does not > place correct (expected) braces around the generated expression. > Additionally, this method adds an unwanted extra condition for each > invocation. > For example, if you call > {noformat} > filter.addAndFilter("a", "b"); > filter.addOrFilter("x", new String[] {"v1", "v2"}), > {noformat} > the resulting JCR XPATH expression will be: > @a="b" and @x="v1" or @x="v2" and @x="v2" > instead of the expected > @a="b" and (@x="v1" or @x="v2") -- This message was sent by Atlassian JIRA (v6.2#6252)