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 2021/12/15 09:51:23 UTC

[shardingsphere] branch master updated: Fixes persist invalid data source pool properties to registry center (#14092)

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 b84ded0  Fixes persist invalid data source pool properties to registry center (#14092)
b84ded0 is described below

commit b84ded0c18209819381c9b4c465c959658ceef43
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Wed Dec 15 17:50:33 2021 +0800

    Fixes persist invalid data source pool properties to registry center (#14092)
    
    Co-authored-by: shardingsphere <de...@shardingsphere.apache.org>
---
 .../datasource/pool/creator/impl/AbstractDataSourcePoolCreator.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/pool/creator/impl/AbstractDataSourcePoolCreator.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/pool/creator/impl/AbstractDataSourcePoolCreator.java
index f9de318..3c9e864 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/pool/creator/impl/AbstractDataSourcePoolCreator.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/pool/creator/impl/AbstractDataSourcePoolCreator.java
@@ -69,7 +69,7 @@ public abstract class AbstractDataSourcePoolCreator implements DataSourcePoolCre
             String propertyName = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, each.getName().substring(GETTER_PREFIX.length()));
             if (GENERAL_CLASS_TYPES.contains(each.getReturnType()) && !SKIPPED_PROPERTY_KEYS.contains(propertyName)) {
                 Object propertyValue = each.invoke(target);
-                if (null != propertyValue) {
+                if (null != propertyValue && !isInvalidProperty(propertyName, propertyValue)) {
                     result.put(propertyName, propertyValue);
                 }
             }