seatunnel-datasource/seatunnel-datasource-plugins/datasource-s3redshift/src/main/java/org/apache/seatunnel/datasource/plugin/redshift/s3/S3RedshiftDataSourceChannel.java [107:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void checkJdbcConnection(Map<String, String> requestParams) {
        String jdbcUrl = requestParams.get(S3RedshiftOptionRule.JDBC_URL.key());
        String username = requestParams.get(S3RedshiftOptionRule.JDBC_USER.key());
        String password = requestParams.get(S3RedshiftOptionRule.JDBC_PASSWORD.key());
        if (StringUtils.isBlank(jdbcUrl)) {
            throw new DataSourcePluginException("Redshift Jdbc url is empty");
        }
        if (StringUtils.isBlank(username) && StringUtils.isBlank(password)) {
            try (Connection ignored = DriverManager.getConnection(jdbcUrl)) {
                log.info("Redshift jdbc connection is valid");
                return;
            } catch (SQLException e) {
                throw new DataSourcePluginException(
                        "Check Redshift jdbc connection failed,please check your config", e);
            }
        }
        try (Connection ignored = DriverManager.getConnection(jdbcUrl, username, password)) {
            log.info("Redshift jdbc connection is valid");
        } catch (SQLException e) {
            throw new DataSourcePluginException(
                    "Check Redshift jdbc connection failed,please check your config", e);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



seatunnel-datasource/seatunnel-datasource-plugins/datasource-s3-redshift/src/main/java/org/apache/seatunnel/datasource/plugin/redshift/s3/S3RedshiftDataSourceChannel.java [104:126]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void checkJdbcConnection(Map<String, String> requestParams) {
        String jdbcUrl = requestParams.get(S3RedshiftOptionRule.JDBC_URL.key());
        String username = requestParams.get(S3RedshiftOptionRule.JDBC_USER.key());
        String password = requestParams.get(S3RedshiftOptionRule.JDBC_PASSWORD.key());
        if (StringUtils.isBlank(jdbcUrl)) {
            throw new DataSourcePluginException("Redshift Jdbc url is empty");
        }
        if (StringUtils.isBlank(username) && StringUtils.isBlank(password)) {
            try (Connection ignored = DriverManager.getConnection(jdbcUrl)) {
                log.info("Redshift jdbc connection is valid");
                return;
            } catch (SQLException e) {
                throw new DataSourcePluginException(
                        "Check Redshift jdbc connection failed,please check your config", e);
            }
        }
        try (Connection ignored = DriverManager.getConnection(jdbcUrl, username, password)) {
            log.info("Redshift jdbc connection is valid");
        } catch (SQLException e) {
            throw new DataSourcePluginException(
                    "Check Redshift jdbc connection failed,please check your config", e);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



