From 67a16f2f08537a52e831881e6c8e85ab6b532a89 Mon Sep 17 00:00:00 2001 From: loy Date: Wed, 19 Sep 2018 12:49:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-11437=20=E8=B0=83=E6=95=B4druid=E6=BA=90?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/third/alibaba/druid/pool/DruidDataSourceFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }