You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/30 05:59:02 UTC

[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #18720: modify auditStrategies to auditStrategy

terrymanu commented on code in PR #18720:
URL: https://github.com/apache/shardingsphere/pull/18720#discussion_r910635476


##########
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-api/src/main/java/org/apache/shardingsphere/sharding/api/config/strategy/audit/ShardingAuditStrategyConfiguration.java:
##########
@@ -18,21 +18,23 @@
 package org.apache.shardingsphere.sharding.api.config.strategy.audit;
 
 import com.google.common.base.Preconditions;
+import java.util.Collection;
 import lombok.Getter;
 
 /**
  * Sharding audit strategy configuration.
  */
+
 @Getter
 public final class ShardingAuditStrategyConfiguration {
     
-    private final String auditAlgorithmName;
+    private final Collection<String> auditAlgorithmNames;
     
     private final boolean allowHintDisable;
     
-    public ShardingAuditStrategyConfiguration(final String auditAlgorithmName, final boolean allowHintDisable) {
-        Preconditions.checkNotNull(auditAlgorithmName, "Sharding audit algorithm name is required.");
-        this.auditAlgorithmName = auditAlgorithmName;
+    public ShardingAuditStrategyConfiguration(final Collection<String> auditAlgorithmNames, final boolean allowHintDisable) {
+        Preconditions.checkNotNull(auditAlgorithmNames, "Sharding audit algorithm names is required.");

Review Comment:
   It is better to check collection empty 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org