jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maxim Zinal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OCM-68) Incorrect behaviour of Filter.addOrFilter() method
Date Thu, 03 Jul 2014 12:41:24 GMT

     [ 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)

Mime
View raw message