@@ -168,7 +168,7 @@ private void set(DataSourceProperty property, String value) {
168
168
*/
169
169
public T build () {
170
170
DataSourceProperties <T > properties = DataSourceProperties .forType (this .classLoader , this .type );
171
- DataSourceProperties <T > derriveFromProperties = (this .deriveFrom != null )
171
+ DataSourceProperties <T > deriveFromProperties = (this .deriveFrom != null )
172
172
? DataSourceProperties .forType (this .classLoader , this .type ) : null ;
173
173
Class <? extends T > instanceType = (this .type != null ) ? this .type : properties .getDataSourceInstanceType ();
174
174
T dataSource = BeanUtils .instantiateClass (instanceType );
@@ -179,8 +179,8 @@ public T build() {
179
179
properties .set (dataSource , property , value );
180
180
applied .add (property );
181
181
}
182
- else if (derriveFromProperties != null && properties .canSet (property )) {
183
- String value = derriveFromProperties .get (this .deriveFrom , property );
182
+ else if (deriveFromProperties != null && properties .canSet (property )) {
183
+ String value = deriveFromProperties .get (this .deriveFrom , property );
184
184
if (value != null ) {
185
185
properties .set (dataSource , property , value );
186
186
applied .add (property );
@@ -230,7 +230,7 @@ public static DataSourceBuilder<?> derivedFrom(DataSource dataSource) {
230
230
dataSource = dataSource .unwrap (DataSource .class );
231
231
}
232
232
catch (SQLException ex ) {
233
- throw new IllegalStateException ("Unable to unwap embedded database" , ex );
233
+ throw new IllegalStateException ("Unable to unwrap embedded database" , ex );
234
234
}
235
235
}
236
236
return new DataSourceBuilder <>(dataSource );
@@ -475,7 +475,7 @@ private static class ReflectionDataSourceProperties<T extends DataSource> implem
475
475
476
476
private final Map <DataSourceProperty , Method > setters ;
477
477
478
- private Class <T > dataSourceType ;
478
+ private final Class <T > dataSourceType ;
479
479
480
480
ReflectionDataSourceProperties (Class <T > dataSourceType ) {
481
481
Assert .state (dataSourceType != null , "No supported DataSource type found" );
@@ -521,7 +521,7 @@ public String get(T dataSource, DataSourceProperty property) {
521
521
private Method getMethod (DataSourceProperty property , Map <DataSourceProperty , Method > setters2 ) {
522
522
Method method = setters2 .get (property );
523
523
UnsupportedDataSourcePropertyException .throwIf (method == null ,
524
- () -> "Unable to find sutable method for " + property );
524
+ () -> "Unable to find suitable method for " + property );
525
525
ReflectionUtils .makeAccessible (method );
526
526
return method ;
527
527
}
@@ -543,7 +543,7 @@ private interface Setter<T, V> {
543
543
}
544
544
545
545
/**
546
- * {@link MappedDataSource } for Hikari.
546
+ * {@link DataSourceProperties } for Hikari.
547
547
*/
548
548
private static class HikariDataSourceProperties extends MappedDataSourceProperties <HikariDataSource > {
549
549
@@ -558,7 +558,7 @@ private static class HikariDataSourceProperties extends MappedDataSourceProperti
558
558
}
559
559
560
560
/**
561
- * {@link MappedDataSource } for Tomcat Pool.
561
+ * {@link DataSourceProperties } for Tomcat Pool.
562
562
*/
563
563
private static class TomcatPoolDataSourceProperties
564
564
extends MappedDataSourceProperties <org .apache .tomcat .jdbc .pool .DataSource > {
@@ -577,7 +577,7 @@ private static class TomcatPoolDataSourceProperties
577
577
}
578
578
579
579
/**
580
- * {@link MappedDataSource } for DBCP2.
580
+ * {@link DataSourceProperties } for DBCP2.
581
581
*/
582
582
private static class MappedDbcp2DataSource extends MappedDataSourceProperties <BasicDataSource > {
583
583
@@ -592,7 +592,7 @@ private static class MappedDbcp2DataSource extends MappedDataSourceProperties<Ba
592
592
}
593
593
594
594
/**
595
- * {@link MappedDataSource } for Oracle Pool.
595
+ * {@link DataSourceProperties } for Oracle Pool.
596
596
*/
597
597
private static class OraclePoolDataSourceProperties extends MappedDataSourceProperties <PoolDataSource > {
598
598
@@ -612,7 +612,7 @@ public Class<? extends PoolDataSource> getDataSourceInstanceType() {
612
612
}
613
613
614
614
/**
615
- * {@link MappedDataSource } for Spring's {@link SimpleDriverDataSource}.
615
+ * {@link DataSourceProperties } for Spring's {@link SimpleDriverDataSource}.
616
616
*/
617
617
private static class SimpleDataSourceProperties extends MappedDataSourceProperties <SimpleDriverDataSource > {
618
618
@@ -628,7 +628,7 @@ private static class SimpleDataSourceProperties extends MappedDataSourceProperti
628
628
}
629
629
630
630
/**
631
- * {@link MappedDataSource } for Oracle.
631
+ * {@link DataSourceProperties } for Oracle.
632
632
*/
633
633
private static class OracleDataSourceProperties extends MappedDataSourceProperties <OracleDataSource > {
634
634
@@ -641,7 +641,7 @@ private static class OracleDataSourceProperties extends MappedDataSourceProperti
641
641
}
642
642
643
643
/**
644
- * {@link MappedDataSource } for H2.
644
+ * {@link DataSourceProperties } for H2.
645
645
*/
646
646
private static class H2DataSourceProperties extends MappedDataSourceProperties <JdbcDataSource > {
647
647
@@ -654,7 +654,7 @@ private static class H2DataSourceProperties extends MappedDataSourceProperties<J
654
654
}
655
655
656
656
/**
657
- * {@link MappedDataSource } for Postgres.
657
+ * {@link DataSourceProperties } for Postgres.
658
658
*/
659
659
private static class PostgresDataSourceProperties extends MappedDataSourceProperties <PGSimpleDataSource > {
660
660
0 commit comments