diff --git a/fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSourceFactory.java b/fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSourceFactory.java index 5ab99fa48..256decf5d 100644 --- a/fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSourceFactory.java +++ b/fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSourceFactory.java @@ -425,11 +425,11 @@ public class DruidDataSourceFactory implements ObjectFactory { } value = (String) properties.get(PROP_VALIDATIONQUERY); - if (value != null) { + if (value != null && value.length() > 0) { dataSource.setValidationQuery(value); } else { value = (String) properties.get(HB_PROP_VALIDATIONQUERY); - if (value != null) { + if (value != null && value.length() > 0) { dataSource.setValidationQuery(value); } }