This is an automated email from the ASF dual-hosted git repository. zhangliang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push: new e8c6f26d2e1 Refactor NodePathSearcher (#34968) e8c6f26d2e1 is described below commit e8c6f26d2e1ab05b3ce8f360819f1dd530e18e64 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Thu Mar 13 11:09:23 2025 +0800 Refactor NodePathSearcher (#34968) --- .../mode/node/path/engine/searcher/NodePathSearcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/engine/searcher/NodePathSearcher.java b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/engine/searcher/NodePathSearcher.java index 5dd9e083d29..8758c167c94 100644 --- a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/engine/searcher/NodePathSearcher.java +++ b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/engine/searcher/NodePathSearcher.java @@ -68,8 +68,8 @@ public final class NodePathSearcher { return createPattern(criteria.getSearchExample(), criteria.isTrimEmptyNode(), criteria.isContainsChildPath()).matcher(path).find(); } - private static Pattern createPattern(final NodePath nodePathCriteria, final boolean trimEmptyNode, final boolean containsChildPath) { + private static Pattern createPattern(final NodePath searchExample, final boolean trimEmptyNode, final boolean containsChildPath) { String endPattern = containsChildPath ? "?" : "$"; - return Pattern.compile(START_PATTERN + NodePathGenerator.toPath(nodePathCriteria, trimEmptyNode) + endPattern, Pattern.CASE_INSENSITIVE); + return Pattern.compile(START_PATTERN + NodePathGenerator.toPath(searchExample, trimEmptyNode) + endPattern, Pattern.CASE_INSENSITIVE); } }