You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/01/09 16:30:44 UTC

svn commit: r1430891 - /activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java

Author: chirino
Date: Wed Jan  9 15:30:43 2013
New Revision: 1430891

URL: http://svn.apache.org/viewvc?rev=1430891&view=rev
Log:
support disabling the hyphenated and auto string conversion options.

Modified:
    activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java

Modified: activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java?rev=1430891&r1=1430890&r2=1430891&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java (original)
+++ activemq/activemq-apollo/trunk/apollo-selector/src/main/java/org/apache/activemq/apollo/selector/SelectorParser.java Wed Jan  9 15:30:43 2013
@@ -31,6 +31,8 @@ public class SelectorParser {
     private static final LRUCache cache = new LRUCache(100);
     private static final String CONVERT_STRING_EXPRESSIONS_PREFIX = "convert_string_expressions:";
     private static final String HYPHENATED_PROPS_PREFIX = "hyphenated_props:";
+    private static final String NO_CONVERT_STRING_EXPRESSIONS_PREFIX = "no_convert_string_expressions:";
+    private static final String NO_HYPHENATED_PROPS_PREFIX = "no_hyphenated_props:";
 
     public static BooleanExpression parse(String sql) throws FilterException {
         Object result = cache.get(sql);
@@ -53,6 +55,16 @@ public class SelectorParser {
                   actual = actual.substring(HYPHENATED_PROPS_PREFIX.length());
                   continue;
               }
+              if( actual.startsWith(NO_CONVERT_STRING_EXPRESSIONS_PREFIX)) {
+                  convertStringExpressions = false;
+                  actual = actual.substring(NO_CONVERT_STRING_EXPRESSIONS_PREFIX.length());
+                  continue;
+              }
+              if( actual.startsWith(NO_HYPHENATED_PROPS_PREFIX)) {
+                  hyphenatedProps = false;
+                  actual = actual.substring(NO_HYPHENATED_PROPS_PREFIX.length());
+                  continue;
+              }
               break;
             }