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 32d38ec84c6 Code format for BroadcastSQLRouter (#34005)
32d38ec84c6 is described below

commit 32d38ec84c64dec68c72df6f25f1c023e74ef25d
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Dec 11 12:19:21 2024 +0800

    Code format for BroadcastSQLRouter (#34005)
---
 .../apache/shardingsphere/broadcast/route/BroadcastSQLRouter.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/route/BroadcastSQLRouter.java
 
b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/route/BroadcastSQLRouter.java
index 0e2925625b9..e9926f0b89b 100644
--- 
a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/route/BroadcastSQLRouter.java
+++ 
b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/route/BroadcastSQLRouter.java
@@ -41,7 +41,10 @@ public final class BroadcastSQLRouter implements 
EntranceSQLRouter<BroadcastRule
     public RouteContext createRouteContext(final QueryContext queryContext, 
final RuleMetaData globalRuleMetaData, final ShardingSphereDatabase database,
                                            final BroadcastRule rule, final 
Collection<String> tableNames, final ConfigurationProperties props) {
         Collection<String> broadcastTableNames = 
rule.getBroadcastTableNames(tableNames);
-        return broadcastTableNames.isEmpty() ? new RouteContext() : 
BroadcastRouteEngineFactory.newInstance(queryContext, 
broadcastTableNames).route(rule);
+        if (broadcastTableNames.isEmpty()) {
+            return new RouteContext();
+        }
+        return BroadcastRouteEngineFactory.newInstance(queryContext, 
broadcastTableNames).route(rule);
     }
     
     @Override

Reply via email to