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 06c30c878a1 Refactor GlobalPropertiesNodePath (#34325) 06c30c878a1 is described below commit 06c30c878a15e3ae52f038f207a5e76e07740b08 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Sun Jan 12 19:18:43 2025 +0800 Refactor GlobalPropertiesNodePath (#34325) --- .../org/apache/shardingsphere/mode/path/GlobalPropertiesNodePath.java | 2 +- .../apache/shardingsphere/mode/path/GlobalPropertiesNodePathTest.java | 4 ++-- .../cluster/dispatch/handler/global/PropertiesChangedHandler.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mode/api/src/main/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePath.java b/mode/api/src/main/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePath.java index 5ca76b82721..e5228b8d21b 100644 --- a/mode/api/src/main/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePath.java +++ b/mode/api/src/main/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePath.java @@ -78,7 +78,7 @@ public final class GlobalPropertiesNodePath { * @param path path * @return true or false */ - public static boolean issActiveVersionPath(final String path) { + public static boolean isActiveVersionPath(final String path) { Pattern pattern = Pattern.compile(getActiveVersionPath() + "$", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(path); return matcher.find(); diff --git a/mode/api/src/test/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePathTest.java b/mode/api/src/test/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePathTest.java index 8717bd5ed25..14c9023d2f8 100644 --- a/mode/api/src/test/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePathTest.java +++ b/mode/api/src/test/java/org/apache/shardingsphere/mode/path/GlobalPropertiesNodePathTest.java @@ -46,7 +46,7 @@ class GlobalPropertiesNodePathTest { } @Test - void assertIssActiveVersionPath() { - assertTrue(GlobalPropertiesNodePath.issActiveVersionPath("/props/active_version")); + void assertIsActiveVersionPath() { + assertTrue(GlobalPropertiesNodePath.isActiveVersionPath("/props/active_version")); } } diff --git a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/PropertiesChangedHandler.java b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/PropertiesChangedHandler.java index 3fa9687a1c7..4c1667cd572 100644 --- a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/PropertiesChangedHandler.java +++ b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/dispatch/handler/global/PropertiesChangedHandler.java @@ -44,7 +44,7 @@ public final class PropertiesChangedHandler implements DataChangedEventHandler { @Override public void handle(final ContextManager contextManager, final DataChangedEvent event) { - if (!GlobalPropertiesNodePath.issActiveVersionPath(event.getKey())) { + if (!GlobalPropertiesNodePath.isActiveVersionPath(event.getKey())) { return; } ActiveVersionChecker.checkActiveVersion(contextManager, event);