Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2228#discussion_r208822183
  
    --- Diff: 
artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/SelectorParser.java
 ---
    @@ -80,11 +78,15 @@ public static BooleanExpression parse(String sql) 
throws FilterException {
                    StrictParser parser = new StrictParser(new 
StringReader(actual));
                    e = parser.JmsSelector();
                 }
    -            cache.put(sql, e);
    +            synchronized (cache) {
    --- End diff --
    
    On that then, i would simply remove the use in the SelectorParser for this 
particular case.
    
    Re the actual class, if its used in OpenWireProtocolManager then it would 
suggest the LRUCache is being used beyond its original scope and should move 
out of its current location into common util, if it is to be re-used in other 
area's and then if it is to slowly be used in other areas such us the protocol 
manager, it may warrant some future efforts to harden it. 


---

Reply via email to