You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/03/04 17:04:43 UTC
(shardingsphere) branch master updated: Refactor VersionNodePathParser (#34878)
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 0f6669fcca2 Refactor VersionNodePathParser (#34878)
0f6669fcca2 is described below
commit 0f6669fcca252e422870184295c1872d7241159d
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Wed Mar 5 01:04:37 2025 +0800
Refactor VersionNodePathParser (#34878)
---
.../mode/node/path/type/version/VersionNodePathParser.java | 5 -----
1 file changed, 5 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 5f8f1521f55..c791c04ee48 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
@@ -28,16 +28,11 @@ import java.util.regex.Pattern;
*/
public final class VersionNodePathParser {
- private static final String VERSION_PATTERN = "(\\d+)";
-
private final Pattern activeVersionPattern;
- private final Pattern versionPattern;
-
public VersionNodePathParser(final NodePath nodePath) {
VersionNodePath versionNodePath = new VersionNodePath(nodePath);
activeVersionPattern = Pattern.compile(versionNodePath.getActiveVersionPath() + "$", Pattern.CASE_INSENSITIVE);
- versionPattern = Pattern.compile(String.join("/", versionNodePath.getVersionsPath(), VERSION_PATTERN) + "$", Pattern.CASE_INSENSITIVE);
}
/**