Commit 182754a5 authored by Phillip Webb's avatar Phillip Webb

Polish HealthIndicatorAutoConfiguration

Update HealthIndicatorAutoConfiguration to reduce the amount of
duplication in inner configuration classes.
parent 4af70f18
......@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.jdbc.metadata;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.sql.DataSource;
......@@ -40,7 +41,9 @@ public class DataSourcePoolMetadataProviders implements DataSourcePoolMetadataPr
*/
public DataSourcePoolMetadataProviders(
Collection<? extends DataSourcePoolMetadataProvider> providers) {
this.providers = new ArrayList<DataSourcePoolMetadataProvider>(providers);
this.providers = (providers == null ? Collections
.<DataSourcePoolMetadataProvider> emptyList()
: new ArrayList<DataSourcePoolMetadataProvider>(providers));
}
@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