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 2153557aef0 Refactor VersionNodePathParser (#34767) 2153557aef0 is described below commit 2153557aef0233ff4302bc875220e4ae30dc2df8 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Sun Feb 23 21:25:22 2025 +0800 Refactor VersionNodePathParser (#34767) --- .../mode/node/path/type/version/VersionNodePathParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePathParser.java b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePathParser.java index 84244aab883..ab4529b99d4 100644 --- a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePathParser.java +++ b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePathParser.java @@ -33,9 +33,9 @@ public final class VersionNodePathParser { private final Pattern versionPattern; public VersionNodePathParser(final String regex) { - VersionNodePath generator = new VersionNodePath(regex); - activeVersionPattern = Pattern.compile(generator.getActiveVersionPath() + "$", Pattern.CASE_INSENSITIVE); - versionPattern = Pattern.compile(String.join("/", generator.getVersionsPath(), VERSION_PATTERN) + "$", Pattern.CASE_INSENSITIVE); + VersionNodePath versionNodePath = new VersionNodePath(regex); + activeVersionPattern = Pattern.compile(versionNodePath.getActiveVersionPath() + "$", Pattern.CASE_INSENSITIVE); + versionPattern = Pattern.compile(String.join("/", versionNodePath.getVersionsPath(), VERSION_PATTERN) + "$", Pattern.CASE_INSENSITIVE); } /**