Commit eb83b2e0 authored by Phillip Webb's avatar Phillip Webb

Fix DataSourceHealthIndicator test failure

Fix failure introduced in commit 8af02ce0.

See gh-11880
parent 8af02ce0
...@@ -86,7 +86,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator ...@@ -86,7 +86,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator
super("DataSource health check failed"); super("DataSource health check failed");
this.dataSource = dataSource; this.dataSource = dataSource;
this.query = query; this.query = query;
this.jdbcTemplate = new JdbcTemplate(dataSource); this.jdbcTemplate = (dataSource == null ? null : new JdbcTemplate(dataSource));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment