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 5d4e508  Refactor DataSourcePropertiesValidator (#14966)
5d4e508 is described below

commit 5d4e508138175a62cf0feaf3f11e005dc63dcfc5
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Jan 21 07:13:16 2022 +0800

    Refactor DataSourcePropertiesValidator (#14966)
---
 .../infra/datasource/props/DataSourcePropertiesValidator.java         | 4 ++--
 .../infra/datasource/props/InvalidDataSourcePropertiesException.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesValidator.java
 
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesValidator.java
index 7569e7c..a4b5a25 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesValidator.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/DataSourcePropertiesValidator.java
@@ -53,14 +53,14 @@ public final class DataSourcePropertiesValidator {
         }
     }
     
-    private void validate(final String name, final DataSourceProperties 
dataSourceProps) throws InvalidDataSourcePropertiesException {
+    private void validate(final String dataSourceName, final 
DataSourceProperties dataSourceProps) throws 
InvalidDataSourcePropertiesException {
         DataSource dataSource = null;
         try {
             dataSource = DataSourcePoolCreator.create(dataSourceProps);
             // CHECKSTYLE:OFF
         } catch (final Exception ex) {
             // CHECKSTYLE:ON
-            throw new InvalidDataSourcePropertiesException(name, 
ex.getMessage());
+            throw new InvalidDataSourcePropertiesException(dataSourceName, 
ex.getMessage());
         } finally {
             if (null != dataSource) {
                 try {
diff --git 
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/InvalidDataSourcePropertiesException.java
 
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/InvalidDataSourcePropertiesException.java
index 9cca66e..00fcf4e 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/InvalidDataSourcePropertiesException.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datasource/props/InvalidDataSourcePropertiesException.java
@@ -24,7 +24,7 @@ public final class InvalidDataSourcePropertiesException 
extends Exception {
     
     private static final long serialVersionUID = -7221138369057943935L;
     
-    public InvalidDataSourcePropertiesException(final String 
dataSourcePropertyName, final String errorMessage) {
-        super(String.format("Invalid data source property name `%s`, error 
message is: %s", dataSourcePropertyName, errorMessage));
+    public InvalidDataSourcePropertiesException(final String dataSourceName, 
final String errorMessage) {
+        super(String.format("Invalid data source `%s`, error message is: %s", 
dataSourceName, errorMessage));
     }
 }

Reply via email to