From d64a44547c2b2b69c771b16d9ac4e1ef5f8d8ce1 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 21 Aug 2013 19:00:37 -0700 Subject: [PATCH] Fix DataSourceConfiguration isTestOnReturn() Fix setTestOnReturn to use isTestOnReturn. --- .../boot/autoconfigure/jdbc/BasicDataSourceConfiguration.java | 2 +- .../boot/autoconfigure/jdbc/TomcatDataSourceConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/BasicDataSourceConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/BasicDataSourceConfiguration.java index 53398e325d..98f8ab4169 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/BasicDataSourceConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/BasicDataSourceConfiguration.java @@ -54,7 +54,7 @@ public class BasicDataSourceConfiguration extends AbstractDataSourceConfiguratio this.pool.setMaxIdle(getMaxIdle()); this.pool.setMinIdle(getMinIdle()); this.pool.setTestOnBorrow(isTestOnBorrow()); - this.pool.setTestOnReturn(isTestOnBorrow()); + this.pool.setTestOnReturn(isTestOnReturn()); this.pool.setValidationQuery(getValidationQuery()); return this.pool; } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfiguration.java index 54fbf7e15d..de24c3197a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfiguration.java @@ -44,7 +44,7 @@ public class TomcatDataSourceConfiguration extends AbstractDataSourceConfigurati this.pool.setMaxIdle(getMaxIdle()); this.pool.setMinIdle(getMinIdle()); this.pool.setTestOnBorrow(isTestOnBorrow()); - this.pool.setTestOnReturn(isTestOnBorrow()); + this.pool.setTestOnReturn(isTestOnReturn()); this.pool.setValidationQuery(getValidationQuery()); return this.pool; }