You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2023/04/27 09:36:32 UTC

[shardingsphere] branch master updated: Remove useless CircuitBreakerDataSource.close() (#25363)

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 5edfb7b43c7 Remove useless CircuitBreakerDataSource.close() (#25363)
5edfb7b43c7 is described below

commit 5edfb7b43c77f4fb65af4c87e48db62644616f21
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu Apr 27 17:36:24 2023 +0800

    Remove useless CircuitBreakerDataSource.close() (#25363)
---
 .../driver/state/circuit/datasource/CircuitBreakerDataSource.java   | 6 +-----
 .../state/circuit/datasource/CircuitBreakerDataSourceTest.java      | 5 -----
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSource.java b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSource.java
index a673cf0a36c..0d93527ba6d 100644
--- a/jdbc/core/src/main/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSource.java
+++ b/jdbc/core/src/main/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSource.java
@@ -25,7 +25,7 @@ import java.sql.Connection;
 /**
  * Circuit breaker datasource.
  */
-public final class CircuitBreakerDataSource extends AbstractDataSourceAdapter implements AutoCloseable {
+public final class CircuitBreakerDataSource extends AbstractDataSourceAdapter {
     
     @Override
     public Connection getConnection() {
@@ -45,8 +45,4 @@ public final class CircuitBreakerDataSource extends AbstractDataSourceAdapter im
     @Override
     public void setLoginTimeout(final int seconds) {
     }
-    
-    @Override
-    public void close() {
-    }
 }
diff --git a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSourceTest.java b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSourceTest.java
index 089eb72d7c0..59989f21a0d 100644
--- a/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSourceTest.java
+++ b/jdbc/core/src/test/java/org/apache/shardingsphere/driver/state/circuit/datasource/CircuitBreakerDataSourceTest.java
@@ -28,11 +28,6 @@ class CircuitBreakerDataSourceTest {
     
     private final CircuitBreakerDataSource dataSource = new CircuitBreakerDataSource();
     
-    @Test
-    void assertClose() {
-        dataSource.close();
-    }
-    
     @Test
     void assertGetConnection() {
         assertThat(dataSource.getConnection(), instanceOf(CircuitBreakerConnection.class));