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/07 08:00:51 UTC
(shardingsphere) branch master updated: Remove useless VersionNodePath.isActiveVersionPath (#34916)
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 381320538f5 Remove useless VersionNodePath.isActiveVersionPath (#34916)
381320538f5 is described below
commit 381320538f59394fa1b00f216f79bbe802af81f9
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Mar 7 16:00:45 2025 +0800
Remove useless VersionNodePath.isActiveVersionPath (#34916)
---
.../shardingsphere/mode/node/path/version/VersionNodePath.java | 10 ----------
.../mode/node/path/version/VersionNodePathTest.java | 8 --------
2 files changed, 18 deletions(-)
diff --git a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePath.java b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePath.java
index 8d1915920e2..0efb50c413d 100644
--- a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePath.java
+++ b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePath.java
@@ -62,14 +62,4 @@ public final class VersionNodePath {
public String getVersionPath(final int version) {
return String.join("/", getVersionsPath(), String.valueOf(version));
}
-
- /**
- * Is active version path.
- *
- * @param path path
- * @return is active version path or not
- */
- public static boolean isActiveVersionPath(final String path) {
- return path.endsWith(ACTIVE_VERSION);
- }
}
diff --git a/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathTest.java b/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathTest.java
index 2d82b2d6366..1f9559f00b9 100644
--- a/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathTest.java
+++ b/mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/version/VersionNodePathTest.java
@@ -22,8 +22,6 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
class VersionNodePathTest {
@@ -41,10 +39,4 @@ class VersionNodePathTest {
void assertGetVersionPath() {
assertThat(new VersionNodePath(new TableMetadataNodePath("foo_db", "foo_schema", "foo_tbl")).getVersionPath(0), is("/metadata/foo_db/schemas/foo_schema/tables/foo_tbl/versions/0"));
}
-
- @Test
- void assertIsActiveVersionPath() {
- assertTrue(VersionNodePath.isActiveVersionPath("foo/active_version"));
- assertFalse(VersionNodePath.isActiveVersionPath("foo/versions"));
- }
}