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

[shardingsphere] branch master updated: fix sonar issue (#26682)

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

jianglongtao 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 705b9c77cea fix sonar issue (#26682)
705b9c77cea is described below

commit 705b9c77ceadd1814093d9d8916b4a8285bd3ce1
Author: jiangML <10...@qq.com>
AuthorDate: Thu Jun 29 12:41:24 2023 +0800

    fix sonar issue (#26682)
---
 .../test/e2e/agent/jdbc/project/JdbcProjectApplication.java | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
index 22b4f3cd804..6480bf8f50e 100644
--- a/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
+++ b/test/e2e/agent/jdbc-project/src/main/java/org/apache/shardingsphere/test/e2e/agent/jdbc/project/JdbcProjectApplication.java
@@ -25,27 +25,30 @@ import org.apache.shardingsphere.test.e2e.agent.jdbc.project.service.impl.OrderS
 
 import java.sql.Connection;
 import java.sql.DriverManager;
+import java.sql.SQLException;
 import java.util.concurrent.TimeUnit;
 
 /**
  * Jdbc project application.
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
-public class JdbcProjectApplication {
+public final class JdbcProjectApplication {
     
     /**
      * Main.
      *
      * @param args args
-     * @throws Exception Exception
+     * @throws ClassNotFoundException Class not found exception
+     * @throws SQLException SQL exception
+     * @throws InterruptedException interrupted exception
      */
     // CHECKSTYLE:OFF
-    public static void main(final String[] args) throws Exception {
+    public static void main(final String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
         run();
     }
     // CHECKSTYLE:ON
     
-    private static void run() throws Exception {
+    private static void run() throws ClassNotFoundException, SQLException, InterruptedException {
         Connection connection = getConnection();
         OrderService orderService = new OrderServiceImpl(connection);
         OrderController orderController = new OrderController(orderService);
@@ -63,7 +66,7 @@ public class JdbcProjectApplication {
         }
     }
     
-    private static Connection getConnection() throws Exception {
+    private static Connection getConnection() throws ClassNotFoundException, SQLException {
         Class.forName("org.apache.shardingsphere.driver.ShardingSphereDriver");
         String url = "jdbc:shardingsphere:classpath:config.yaml";
         return DriverManager.getConnection(url, "root", "root");