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/02/24 14:57:44 UTC
(shardingsphere) branch master updated: Refactor DatabaseRuleItem (#34780)
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 7cebc26fecd Refactor DatabaseRuleItem (#34780)
7cebc26fecd is described below
commit 7cebc26fecd2da2c82cb7c2dc18c9de351c1be0f
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Feb 24 22:57:37 2025 +0800
Refactor DatabaseRuleItem (#34780)
---
.../node/path/type/metadata/rule/DatabaseRuleItem.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/metadata/rule/DatabaseRuleItem.java b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/metadata/rule/DatabaseRuleItem.java
index e6a4cbc106a..899167818d3 100644
--- a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/metadata/rule/DatabaseRuleItem.java
+++ b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/type/metadata/rule/DatabaseRuleItem.java
@@ -25,23 +25,23 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public final class DatabaseRuleItem {
- private final String itemType;
+ private final String type;
- private final String itemName;
+ private final String name;
public DatabaseRuleItem(final String value) {
String[] values = value.split("/");
if (1 == values.length) {
- itemType = values[0];
- itemName = null;
+ type = values[0];
+ name = null;
} else {
- itemType = values[0];
- itemName = values[1];
+ type = values[0];
+ name = values[1];
}
}
@Override
public String toString() {
- return null == itemName ? itemType : String.join("/", itemType, itemName);
+ return null == name ? type : String.join("/", type, name);
}
}