diff options
author | Andrew Stitcher <astitcher@apache.org> | 2014-06-09 13:23:44 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2014-06-09 13:23:44 +0000 |
commit | 19c21d47662201fdd40a1a5653bdc003b3a8e15d (patch) | |
tree | 5146cdcd31fd2f8031356cf77119356e6b4d7490 /qpid/cpp/src | |
parent | 715eafb68075336fbc72d95d9a5e2b0f82d432f8 (diff) | |
download | qpid-python-19c21d47662201fdd40a1a5653bdc003b3a8e15d.tar.gz |
QPID-5804: Fix broken selector parsing of unary '+'
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1601372 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qpid/broker/SelectorExpression.cpp | 2 | ||||
-rw-r--r-- | qpid/cpp/src/tests/Selector.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/SelectorExpression.cpp b/qpid/cpp/src/qpid/broker/SelectorExpression.cpp index e64fd327d5..1e217737ce 100644 --- a/qpid/cpp/src/qpid/broker/SelectorExpression.cpp +++ b/qpid/cpp/src/qpid/broker/SelectorExpression.cpp @@ -950,10 +950,10 @@ Expression* unaryArithExpression(Tokeniser& tokeniser) return new UnaryArithExpression(&negate, e.release()); } default: + tokeniser.returnTokens(); break; } - tokeniser.returnTokens(); std::auto_ptr<Expression> e(primaryExpression(tokeniser)); return e.release(); } diff --git a/qpid/cpp/src/tests/Selector.cpp b/qpid/cpp/src/tests/Selector.cpp index 59bdd36b77..30c69c68af 100644 --- a/qpid/cpp/src/tests/Selector.cpp +++ b/qpid/cpp/src/tests/Selector.cpp @@ -303,6 +303,8 @@ QPID_AUTO_TEST_CASE(parseString) BOOST_CHECK_NO_THROW(qb::Selector e("(354.6)")); BOOST_CHECK_NO_THROW(qb::Selector e("A is null and 'hello out there'")); BOOST_CHECK_NO_THROW(qb::Selector e("17/4>4")); + BOOST_CHECK_NO_THROW(qb::Selector e("17/4>+4")); + BOOST_CHECK_NO_THROW(qb::Selector e("17/4>-4")); BOOST_CHECK_NO_THROW(qb::Selector e("A IN ('hello', 'there', 1 , true, (1-17))")); } |