From 0e8878d041208b430aa9015b0723e3eb7c874887 Mon Sep 17 00:00:00 2001 From: Artur Havliukovskyi Date: Fri, 8 Nov 2024 20:56:14 +0100 Subject: [PATCH] Make internal fields lowercase after accidental renaming (#114) --- .../flexypool/FlexyPoolConfiguration.java | 16 ++++++++-------- .../flexypool/FlexyPoolDataSourceDecorator.java | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolConfiguration.java b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolConfiguration.java index c1412ae..95d869c 100644 --- a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolConfiguration.java +++ b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolConfiguration.java @@ -152,14 +152,14 @@ public FlexyPoolConfigurationBuilderCustomizer flexyPoolConfigurationBuilderCust static class HikariFlexyConfiguration { @Autowired(required = false) - private List> ConnectionAcquisitionStrategyFactories; + private List> connectionAcquisitionStrategyFactories; @Autowired private DataSourceDecoratorProperties dataSourceDecoratorProperties; @Bean public FlexyPoolDataSourceDecorator flexyPoolDataSourceDecorator() { return new FlexyPoolDataSourceDecorator( - mergeFactories(ConnectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), + mergeFactories(connectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), HikariCPPoolAdapter.FACTORY, HikariDataSource.class); } } @@ -171,14 +171,14 @@ public FlexyPoolDataSourceDecorator flexyPoolDataSourceDecorator() { static class TomcatFlexyConfiguration { @Autowired(required = false) - private List> ConnectionAcquisitionStrategyFactories; + private List> connectionAcquisitionStrategyFactories; @Autowired private DataSourceDecoratorProperties dataSourceDecoratorProperties; @Bean public FlexyPoolDataSourceDecorator flexyPoolDataSourceDecorator() { return new FlexyPoolDataSourceDecorator( - mergeFactories(ConnectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), + mergeFactories(connectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), TomcatCPPoolAdapter.FACTORY, org.apache.tomcat.jdbc.pool.DataSource.class); } } @@ -190,14 +190,14 @@ public FlexyPoolDataSourceDecorator flexyPoolDataSourceDecorator() { static class Dbcp2FlexyConfiguration { @Autowired(required = false) - private List> ConnectionAcquisitionStrategyFactories; + private List> connectionAcquisitionStrategyFactories; @Autowired private DataSourceDecoratorProperties dataSourceDecoratorProperties; @Bean public FlexyPoolDataSourceDecorator flexyPoolDataSourceDecorator() { return new FlexyPoolDataSourceDecorator( - mergeFactories(ConnectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), + mergeFactories(connectionAcquisitionStrategyFactories, dataSourceDecoratorProperties.getFlexyPool()), DBCP2PoolAdapter.FACTORY, BasicDataSource.class); } } @@ -210,11 +210,11 @@ static class PropertyFlexyConfiguration { private static final Logger log = getLogger(PropertyFlexyConfiguration.class); @Autowired(required = false) - private List> ConnectionAcquisitionStrategyFactories; + private List> connectionAcquisitionStrategyFactories; @PostConstruct public void warnIfAnyStrategyFound() { - if (ConnectionAcquisitionStrategyFactories != null) { + if (connectionAcquisitionStrategyFactories != null) { log.warn("ConnectionAcquisitionStrategyFactory beans found in the context will not be applied to " + "FlexyDataSource due to property based configuration of FlexyPool"); } diff --git a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolDataSourceDecorator.java b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolDataSourceDecorator.java index a0beea6..8b8a78e 100644 --- a/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolDataSourceDecorator.java +++ b/datasource-decorator-spring-boot-autoconfigure/src/main/java/com/github/gavlyukovskiy/boot/jdbc/decorator/flexypool/FlexyPoolDataSourceDecorator.java @@ -35,7 +35,7 @@ */ public class FlexyPoolDataSourceDecorator implements DataSourceDecorator, Ordered { - private final ConnectionAcquisitionStrategyFactory[] ConnectionAcquisitionStrategyFactories; + private final ConnectionAcquisitionStrategyFactory[] connectionAcquisitionStrategyFactories; private final PoolAdapterFactory poolAdapterFactory; private final Class dataSourceClass; @@ -44,17 +44,17 @@ public class FlexyPoolDataSourceDecorator implements DataSourceDecorator, Ordere @SuppressWarnings("unchecked") FlexyPoolDataSourceDecorator( - List> ConnectionAcquisitionStrategyFactories, + List> connectionAcquisitionStrategyFactories, PoolAdapterFactory poolAdapterFactory, Class dataSourceClass) { - this.ConnectionAcquisitionStrategyFactories = (ConnectionAcquisitionStrategyFactory[]) - ConnectionAcquisitionStrategyFactories.toArray(new ConnectionAcquisitionStrategyFactory[0]); + this.connectionAcquisitionStrategyFactories = (ConnectionAcquisitionStrategyFactory[]) + connectionAcquisitionStrategyFactories.toArray(new ConnectionAcquisitionStrategyFactory[0]); this.poolAdapterFactory = (PoolAdapterFactory) poolAdapterFactory; this.dataSourceClass = (Class) dataSourceClass; } FlexyPoolDataSourceDecorator() { - ConnectionAcquisitionStrategyFactories = null; + connectionAcquisitionStrategyFactories = null; poolAdapterFactory = null; dataSourceClass = null; } @@ -76,7 +76,7 @@ public DataSource decorate(String beanName, DataSource dataSource) { if (customizers != null) { customizers.forEach(customizer -> customizer.customize(beanName, configurationBuilder, dataSourceClass)); } - FlexyPoolDataSource flexyPoolDataSource = new FlexyPoolDataSource<>(configurationBuilder.build(), ConnectionAcquisitionStrategyFactories); + FlexyPoolDataSource flexyPoolDataSource = new FlexyPoolDataSource<>(configurationBuilder.build(), connectionAcquisitionStrategyFactories); flexyPoolDataSource.start(); return flexyPoolDataSource; }