diff --git a/src/main/java/redis/clients/jedis/MultiClusterClientConfig.java b/src/main/java/redis/clients/jedis/MultiClusterClientConfig.java index cb6fb541e7..980bbb91f9 100644 --- a/src/main/java/redis/clients/jedis/MultiClusterClientConfig.java +++ b/src/main/java/redis/clients/jedis/MultiClusterClientConfig.java @@ -319,15 +319,9 @@ public MultiClusterClientConfig build() { config.retryWaitDuration = Duration.ofMillis(this.retryWaitDuration); config.retryWaitDurationExponentialBackoffMultiplier = this.retryWaitDurationExponentialBackoffMultiplier; - if (this.retryIncludedExceptionList != null && !retryIncludedExceptionList.isEmpty()) { - config.retryIncludedExceptionList = this.retryIncludedExceptionList; - } else { - config.retryIncludedExceptionList = RETRY_INCLUDED_EXCEPTIONS_DEFAULT; - } + config.retryIncludedExceptionList = this.retryIncludedExceptionList; - if (this.retryIgnoreExceptionList != null && !retryIgnoreExceptionList.isEmpty()) { - config.retryIgnoreExceptionList = this.retryIgnoreExceptionList; - } + config.retryIgnoreExceptionList = this.retryIgnoreExceptionList; config.circuitBreakerFailureRateThreshold = this.circuitBreakerFailureRateThreshold; config.circuitBreakerSlidingWindowMinCalls = this.circuitBreakerSlidingWindowMinCalls; @@ -336,21 +330,11 @@ public MultiClusterClientConfig build() { config.circuitBreakerSlowCallDurationThreshold = Duration.ofMillis(this.circuitBreakerSlowCallDurationThreshold); config.circuitBreakerSlowCallRateThreshold = this.circuitBreakerSlowCallRateThreshold; - if (this.circuitBreakerIncludedExceptionList != null && !circuitBreakerIncludedExceptionList.isEmpty()) { - config.circuitBreakerIncludedExceptionList = this.circuitBreakerIncludedExceptionList; - } else { - config.circuitBreakerIncludedExceptionList = CIRCUIT_BREAKER_INCLUDED_EXCEPTIONS_DEFAULT; - } - - if (this.circuitBreakerIgnoreExceptionList != null && !circuitBreakerIgnoreExceptionList.isEmpty()) { - config.circuitBreakerIgnoreExceptionList = this.circuitBreakerIgnoreExceptionList; - } - - if (this.fallbackExceptionList != null && !this.fallbackExceptionList.isEmpty()) { - config.fallbackExceptionList = this.fallbackExceptionList; - } else { - config.fallbackExceptionList = FALLBACK_EXCEPTIONS_DEFAULT; - } + config.circuitBreakerIncludedExceptionList = this.circuitBreakerIncludedExceptionList; + + config.circuitBreakerIgnoreExceptionList = this.circuitBreakerIgnoreExceptionList; + + config.fallbackExceptionList = this.fallbackExceptionList; return config; }