Skip to content

Commit 645956a

Browse files
authoredMar 1, 2025··
Remove useless VersionNodePath.getVersionPath() (#34826)
1 parent 42d3e18 commit 645956a

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed
 

‎mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePath.java

-11
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ public String getVersionPath(final int version) {
6363
return String.join("/", getVersionsPath(), String.valueOf(version));
6464
}
6565

66-
/**
67-
* Get version path.
68-
*
69-
* @param activeVersionPath active version path
70-
* @param activeVersion active version
71-
* @return version path
72-
*/
73-
public static String getVersionPath(final String activeVersionPath, final int activeVersion) {
74-
return String.join("/", activeVersionPath.replace(ACTIVE_VERSION, VERSIONS), String.valueOf(activeVersion));
75-
}
76-
7766
/**
7867
* Get original path.
7968
*

‎mode/node/src/test/java/org/apache/shardingsphere/mode/node/path/type/version/VersionNodePathTest.java

-5
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ void assertGetVersionPath() {
4242
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"));
4343
}
4444

45-
@Test
46-
void assertGetVersionPathFromActiveVersion() {
47-
assertThat(VersionNodePath.getVersionPath("foo_rule/active_version", 1), is("foo_rule/versions/1"));
48-
}
49-
5045
@Test
5146
void assertGetOriginalPath() {
5247
assertThat(VersionNodePath.getOriginalPath("foo_rule/active_version"), is("foo_rule"));

0 commit comments

Comments
 (0)
Please sign in to comment.