mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix to return DataSourceBuilder.Settings for getDataSourceConfig() and getReadOnlyDataSourceConfig()
That is, existing code using DataSourceConfig has access to the getter methods of DataSourceConfig. The DataSourceBuilder interface only has the setter methods and DataSourceBuilder.Settings has both getters and setter methods. That is, the refactor to extract the DataSourceBuilder interface also split off the getter methods to the DataSourceBuilder.Settings interface (because most of the time when using the builder we only need the setter methods and effectively hiding the getter methods behind the settings() is useful to simplify the API for users).
This commit is contained in:
@@ -71,11 +71,11 @@ public class AutoConfigureForTesting implements AutoConfigure {
|
||||
}
|
||||
}
|
||||
|
||||
private void makeV1Compatible(DataSourceBuilder ds) {
|
||||
private void makeV1Compatible(DataSourceBuilder.Settings ds) {
|
||||
if (ds == null) {
|
||||
return;
|
||||
}
|
||||
String url = ds.settings().getUrl();
|
||||
String url = ds.getUrl();
|
||||
if (url == null || !url.startsWith("jdbc:h2:")) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user