devkanro commented on a change in pull request #81:
URL: https://github.com/apache/skywalking-java/pull/81#discussion_r766492234
##########
File path:
apm-sniffer/optional-plugins/trace-ignore-plugin/src/main/java/org/apache/skywalking/apm/plugin/trace/ignore/matcher/FastPathMatcher.java
##########
@@ -122,9 +138,11 @@ private boolean wildcardMatch(String pat, int p, String
str, int s) {
}
private boolean multiWildcardMatch(String pat, int p, String str, int s) {
- // End of pattern, just check the end of string is '/' quickly.
- if (p >= pat.length() && s < str.length()) {
- return str.charAt(str.length() - 1) != '/';
+ switch (safeCharAt(pat, p)) {
+ // End of pattern, just return true quickly.
+ case 0: return true;
Review comment:
If we get EOS when we enter multi-wildcard match state, return true
quickly, because `**` means anything
--
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]