This is an automated email from the ASF dual-hosted git repository.

menghaoran 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 72c9f6f36b3 Refactor GlobalRuleNodePath (#34627)
72c9f6f36b3 is described below

commit 72c9f6f36b363a80a15367d22725cc998cc70cf3
Author: Haoran Meng <[email protected]>
AuthorDate: Tue Feb 11 11:00:07 2025 +0800

    Refactor GlobalRuleNodePath (#34627)
---
 .../shardingsphere/mode/node/path/config/GlobalRuleNodePath.java    | 6 +++---
 .../mode/node/tuple/YamlRepositoryTupleSwapperEngine.java           | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/config/GlobalRuleNodePath.java
 
b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/config/GlobalRuleNodePath.java
index ad897303993..a7fdda89fc0 100644
--- 
a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/config/GlobalRuleNodePath.java
+++ 
b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/path/config/GlobalRuleNodePath.java
@@ -72,12 +72,12 @@ public final class GlobalRuleNodePath {
     }
     
     /**
-     * Get view version pattern node path parser.
+     * Get rule version node path parser.
      *
      * @param ruleTypeName rule type name
-     * @return view version node path parser
+     * @return rule version node path parser
      */
-    public static VersionNodePathParser getVersionNodePathParser(final String 
ruleTypeName) {
+    public static VersionNodePathParser getRuleVersionNodePathParser(final 
String ruleTypeName) {
         return new VersionNodePathParser(ruleTypeName);
     }
 }
diff --git 
a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/tuple/YamlRepositoryTupleSwapperEngine.java
 
b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/tuple/YamlRepositoryTupleSwapperEngine.java
index c5106f8d177..4ce51b065f1 100644
--- 
a/mode/node/src/main/java/org/apache/shardingsphere/mode/node/tuple/YamlRepositoryTupleSwapperEngine.java
+++ 
b/mode/node/src/main/java/org/apache/shardingsphere/mode/node/tuple/YamlRepositoryTupleSwapperEngine.java
@@ -153,7 +153,7 @@ public final class YamlRepositoryTupleSwapperEngine {
                                                                         final 
Class<? extends YamlRuleConfiguration> toBeSwappedType, final 
RepositoryTupleEntity tupleEntity) {
         if 
(YamlGlobalRuleConfiguration.class.isAssignableFrom(toBeSwappedType)) {
             for (RepositoryTuple each : repositoryTuples) {
-                if 
(GlobalRuleNodePath.getVersionNodePathParser(tupleEntity.value()).isVersionPath(each.getKey()))
 {
+                if 
(GlobalRuleNodePath.getRuleVersionNodePathParser(tupleEntity.value()).isVersionPath(each.getKey()))
 {
                     return Optional.of(YamlEngine.unmarshal(each.getValue(), 
toBeSwappedType));
                 }
             }

Reply via email to