You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/09/22 06:00:30 UTC

[shardingsphere] branch master updated: Refactor BackendConnectionException (#21130)

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

duanzhengqiang 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 df412c0181f Refactor BackendConnectionException (#21130)
df412c0181f is described below

commit df412c0181f1011e5f9c8868ee9a136a582bd9ad
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu Sep 22 14:00:17 2022 +0800

    Refactor BackendConnectionException (#21130)
---
 .../proxy/backend/exception/BackendConnectionException.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/BackendConnectionException.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/BackendConnectionException.java
index a29017a79b8..d39ba4d82e0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/BackendConnectionException.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/exception/BackendConnectionException.java
@@ -18,21 +18,19 @@
 package org.apache.shardingsphere.proxy.backend.exception;
 
 import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.apache.shardingsphere.infra.util.exception.internal.ShardingSphereInternalException;
 
 import java.util.Collection;
-import java.util.LinkedList;
 
 /**
  * Exception causes by backend connection.
  */
+@RequiredArgsConstructor
 @Getter
-public final class BackendConnectionException extends Exception {
+public final class BackendConnectionException extends ShardingSphereInternalException {
     
     private static final long serialVersionUID = -543640268050869018L;
     
-    private final Collection<Exception> exceptions = new LinkedList<>();
-    
-    public BackendConnectionException(final Collection<Exception> exceptions) {
-        this.exceptions.addAll(exceptions);
-    }
+    private final Collection<Exception> exceptions;
 }