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

panjuan 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 56bcfd53786 Refactor ShowShadowAlgorithmExecutor (#25724)
56bcfd53786 is described below

commit 56bcfd53786d786c133f5836356aa3002dc225f6
Author: Liang Zhang <[email protected]>
AuthorDate: Wed May 17 13:52:02 2023 +0800

    Refactor ShowShadowAlgorithmExecutor (#25724)
---
 .../shadow/distsql/handler/query/ShowShadowAlgorithmExecutor.java      | 3 +--
 .../sharding/distsql/handler/query/ShowShardingTableRuleExecutor.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmExecutor.java
 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmExecutor.java
index f60f576ea7b..bb36148722a 100644
--- 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmExecutor.java
+++ 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShowShadowAlgorithmExecutor.java
@@ -53,8 +53,7 @@ public final class ShowShadowAlgorithmExecutor implements 
RQLExecutor<ShowShadow
         Collection<LocalDataQueryResultRow> result = new LinkedList<>();
         while (data.hasNext()) {
             Entry<String, AlgorithmConfiguration> row = data.next();
-            result.add(new LocalDataQueryResultRow(row.getKey(), 
row.getValue().getType(),
-                    convertToString(row.getValue().getProps()), 
Boolean.valueOf(row.getKey().equals(defaultAlgorithm)).toString()));
+            result.add(new LocalDataQueryResultRow(row.getKey(), 
row.getValue().getType(), convertToString(row.getValue().getProps()), 
Boolean.toString(row.getKey().equals(defaultAlgorithm))));
         }
         return result;
     }
diff --git 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShowShardingTableRuleExecutor.java
 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShowShardingTableRuleExecutor.java
index 6ae20c7d9ab..1ac2205f1a1 100644
--- 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShowShardingTableRuleExecutor.java
+++ 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/query/ShowShardingTableRuleExecutor.java
@@ -177,7 +177,7 @@ public final class ShowShardingTableRuleExecutor implements 
RQLExecutor<ShowShar
     
     private String getAllowHintDisable(final 
ShardingAuditStrategyConfiguration shardingAuditStrategyConfig) {
         return 
getShardingAuditStrategyConfiguration(shardingAuditStrategyConfig).isPresent()
-                ? 
Boolean.valueOf(getShardingAuditStrategyConfiguration(shardingAuditStrategyConfig).get().isAllowHintDisable()).toString()
+                ? 
Boolean.toString(getShardingAuditStrategyConfiguration(shardingAuditStrategyConfig).get().isAllowHintDisable())
                 : "";
     }
     

Reply via email to