FSchumacher commented on a change in pull request #700:
URL: https://github.com/apache/jmeter/pull/700#discussion_r813146983
##########
File path:
src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
##########
@@ -164,8 +166,12 @@ private boolean arrayMatched(JSONArray value) {
private boolean isEquals(Object subj) {
if (isUseRegex()) {
String str = objectToString(subj);
- Pattern pattern =
JMeterUtils.getPatternCache().getPattern(getExpectedValue());
- return JMeterUtils.getMatcher().matches(str, pattern);
+ if (useJavaRegex) {
+ return java.util.regex.Pattern.matches(getExpectedValue(),
str);
+ } else {
+ Pattern pattern =
JMeterUtils.getPatternCache().getPattern(getExpectedValue());
Review comment:
I can add a factory to JMeterUtils like the old one. We include
caffeine, so a cache should be added real easy. For starting I chose not to add
it, as it is more work and I wanted to have a working state first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]