[ https://issues.apache.org/jira/browse/QPID-8674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872811#comment-17872811 ]
Daniil Kirilyuk commented on QPID-8674: --------------------------------------- Hi, Could you please provide some additional information regarding the logical expressions evaluated? The test provided in the patch fails, but it seems to me that it's supposed to be failing: {code:java} final Filterable message = mock(Filterable.class); when(message.getHeader("color")).thenReturn("red"); when(message.getHeader("price")).thenReturn(100); when(message.getHeader("size")).thenReturn("large"); assertTrue(new JMSSelectorFilter("color = 'red' and price = 100 and size = 'small'").matches(message)); {code} Expression color = 'red' is TRUE Expression price = 100 is TRUE Expression size = 'small' is FALSE The result of the matches() method is FALSE as well, leading to the test failure. Kind regards, Daniil > [Broker-J] Jms Selector Parsing - mulitple AND's > ------------------------------------------------ > > Key: QPID-8674 > URL: https://issues.apache.org/jira/browse/QPID-8674 > Project: Qpid > Issue Type: Bug > Components: Broker-J > Affects Versions: qpid-java-broker-9.2.0 > Reporter: Kyrre > Priority: Major > Attachments: selectorSyntax.patch > > > When parsing a selector with 3 boolean expressions AND'ed together, the last > expression is not taken into account. > I have attached a patch file from the latest Github version of the main > branch to demostrate the problem. > In short, having a selector that evaluates (trueExpression) AND > (trueExpression) AND (falseExpression) evaluates to TRUE. > Patch of JMSSelectorFilterSyntaxTest.java below. > [^selectorSyntax.patch] > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org