This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng 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 6fed708a119 Refactor StorageNode (#28057)
6fed708a119 is described below
commit 6fed708a11936ad73c094551ae97e18ceeb35451
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Aug 12 23:04:52 2023 +0800
Refactor StorageNode (#28057)
---
.../apache/shardingsphere/infra/datasource/storage/StorageNode.java | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git
a/infra/datasource/core/src/main/java/org/apache/shardingsphere/infra/datasource/storage/StorageNode.java
b/infra/datasource/core/src/main/java/org/apache/shardingsphere/infra/datasource/storage/StorageNode.java
index 32c4c3d1d9c..a8746d52fe2 100644
---
a/infra/datasource/core/src/main/java/org/apache/shardingsphere/infra/datasource/storage/StorageNode.java
+++
b/infra/datasource/core/src/main/java/org/apache/shardingsphere/infra/datasource/storage/StorageNode.java
@@ -32,11 +32,7 @@ public final class StorageNode {
@Override
public boolean equals(final Object obj) {
- if (obj instanceof StorageNode) {
- StorageNode storageNode = (StorageNode) obj;
- return storageNode.name.equalsIgnoreCase(name);
- }
- return false;
+ return obj instanceof StorageNode && ((StorageNode)
obj).name.equalsIgnoreCase(name);
}
@Override