[ 
https://issues.apache.org/jira/browse/ARTEMIS-4687?focusedWorklogId=909756&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909756
 ]

ASF GitHub Bot logged work on ARTEMIS-4687:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Mar/24 21:49
            Start Date: 13/Mar/24 21:49
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on code in PR #4852:
URL: https://github.com/apache/activemq-artemis/pull/4852#discussion_r1523955679


##########
artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/JAXPXPathEvaluator.java:
##########
@@ -56,8 +60,11 @@ protected boolean evaluate(String text) {
 
    protected boolean evaluate(InputSource inputSource) {
       try {
-         return ((Boolean)xpath.evaluate(xpathExpression, 
builder.parse(inputSource), XPathConstants.BOOLEAN)).booleanValue();
+         synchronized (builder) {

Review Comment:
   I'm not exactly sure if there _should_ be multiple instances. The `builder` 
is created in a `static` block in 
`org.apache.activemq.artemis.selector.filter.XPathExpression`.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 909756)
    Time Spent: 0.5h  (was: 20m)

> Concurrent use of DocumentBuilder breaking Xpath filtering
> ----------------------------------------------------------
>
>                 Key: ARTEMIS-4687
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4687
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to