Start building against Spring Framework 5.2.9 snapshots

See gh-23182
This commit is contained in:
Stephane Nicoll
2020-09-07 08:47:57 +02:00
parent 611447c4d5
commit 4b5a3f4ff9
5 changed files with 14 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.springframework.boot.jdbc;
import java.sql.DatabaseMetaData;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
@@ -87,7 +89,7 @@ public abstract class AbstractDataSourceInitializer {
protected String getDatabaseName() {
try {
String productName = JdbcUtils.commonDatabaseName(
JdbcUtils.extractDatabaseMetaData(this.dataSource, "getDatabaseProductName").toString());
JdbcUtils.extractDatabaseMetaData(this.dataSource, DatabaseMetaData::getDatabaseProductName));
DatabaseDriver databaseDriver = DatabaseDriver.fromProductName(productName);
if (databaseDriver == DatabaseDriver.UNKNOWN) {
throw new IllegalStateException("Unable to detect database type");