Fix issue #182 by storing variable values in a ThreadLocal map, and add a unit test to check for this.
This might not be a perfect fix, but it seems to do the trick.
After this change, the compiled XPaths for the variable values are still potentially used from multiple threads, and XPathExpression is indicated as not being thread-safe.
But I did not see any easy way to adress this, and this does not seem to cause any problems.
Fix issue #182 by storing variable values in a ThreadLocal map, and add a unit test to check for this.
This might not be a perfect fix, but it seems to do the trick.
After this change, the compiled XPaths for the variable values are still potentially used from multiple threads, and XPathExpression is indicated as not being thread-safe. But I did not see any easy way to adress this, and this does not seem to cause any problems.