@@ -80,7 +80,7 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
80
80
private final DefaultDatabaseClientBuilder builder ;
81
81
82
82
DefaultDatabaseClient (ConnectionFactory connector , R2dbcExceptionTranslator exceptionTranslator ,
83
- ReactiveDataAccessStrategy dataAccessStrategy , DefaultDatabaseClientBuilder builder ) {
83
+ ReactiveDataAccessStrategy dataAccessStrategy , DefaultDatabaseClientBuilder builder ) {
84
84
85
85
this .connector = connector ;
86
86
this .exceptionTranslator = exceptionTranslator ;
@@ -201,15 +201,15 @@ protected ConnectionFactory obtainConnectionFactory() {
201
201
*/
202
202
protected Connection createConnectionProxy (Connection con ) {
203
203
return (Connection ) Proxy .newProxyInstance (ConnectionProxy .class .getClassLoader (),
204
- new Class <?>[]{ ConnectionProxy .class }, new CloseSuppressingInvocationHandler (con ));
204
+ new Class <?>[] { ConnectionProxy .class }, new CloseSuppressingInvocationHandler (con ));
205
205
}
206
206
207
207
/**
208
208
* Translate the given {@link R2dbcException} into a generic {@link DataAccessException}.
209
209
*
210
210
* @param task readable text describing the task being attempted.
211
- * @param sql SQL query or update that caused the problem (may be {@literal null}).
212
- * @param ex the offending {@link R2dbcException}.
211
+ * @param sql SQL query or update that caused the problem (may be {@literal null}).
212
+ * @param ex the offending {@link R2dbcException}.
213
213
* @return a DataAccessException wrapping the {@link R2dbcException} (never {@literal null}).
214
214
*/
215
215
protected DataAccessException translateException (String task , @ Nullable String sql , R2dbcException ex ) {
@@ -222,24 +222,24 @@ protected DataAccessException translateException(String task, @Nullable String s
222
222
* Customization hook.
223
223
*/
224
224
protected <T > DefaultTypedExecuteSpec <T > createTypedExecuteSpec (Map <Integer , SettableValue > byIndex ,
225
- Map <String , SettableValue > byName , Supplier <String > sqlSupplier , Class <T > typeToRead ) {
225
+ Map <String , SettableValue > byName , Supplier <String > sqlSupplier , Class <T > typeToRead ) {
226
226
return new DefaultTypedExecuteSpec <>(byIndex , byName , sqlSupplier , typeToRead );
227
227
}
228
228
229
229
/**
230
230
* Customization hook.
231
231
*/
232
232
protected <T > DefaultTypedExecuteSpec <T > createTypedExecuteSpec (Map <Integer , SettableValue > byIndex ,
233
- Map <String , SettableValue > byName , Supplier <String > sqlSupplier ,
234
- BiFunction <Row , RowMetadata , T > mappingFunction ) {
233
+ Map <String , SettableValue > byName , Supplier <String > sqlSupplier ,
234
+ BiFunction <Row , RowMetadata , T > mappingFunction ) {
235
235
return new DefaultTypedExecuteSpec <>(byIndex , byName , sqlSupplier , mappingFunction );
236
236
}
237
237
238
238
/**
239
239
* Customization hook.
240
240
*/
241
241
protected ExecuteSpecSupport createGenericExecuteSpec (Map <Integer , SettableValue > byIndex ,
242
- Map <String , SettableValue > byName , Supplier <String > sqlSupplier ) {
242
+ Map <String , SettableValue > byName , Supplier <String > sqlSupplier ) {
243
243
return new DefaultGenericExecuteSpec (byIndex , byName , sqlSupplier );
244
244
}
245
245
@@ -251,7 +251,7 @@ protected DefaultGenericExecuteSpec createGenericExecuteSpec(Supplier<String> sq
251
251
}
252
252
253
253
private static void doBind (Statement <?> statement , Map <String , SettableValue > byName ,
254
- Map <Integer , SettableValue > byIndex ) {
254
+ Map <Integer , SettableValue > byIndex ) {
255
255
256
256
byIndex .forEach ((i , o ) -> {
257
257
@@ -377,7 +377,7 @@ public ExecuteSpecSupport bindNull(String name, Class<?> type) {
377
377
}
378
378
379
379
protected ExecuteSpecSupport createInstance (Map <Integer , SettableValue > byIndex , Map <String , SettableValue > byName ,
380
- Supplier <String > sqlSupplier ) {
380
+ Supplier <String > sqlSupplier ) {
381
381
return new ExecuteSpecSupport (byIndex , byName , sqlSupplier );
382
382
}
383
383
@@ -395,7 +395,7 @@ public ExecuteSpecSupport bind(Object bean) {
395
395
protected class DefaultGenericExecuteSpec extends ExecuteSpecSupport implements GenericExecuteSpec {
396
396
397
397
DefaultGenericExecuteSpec (Map <Integer , SettableValue > byIndex , Map <String , SettableValue > byName ,
398
- Supplier <String > sqlSupplier ) {
398
+ Supplier <String > sqlSupplier ) {
399
399
super (byIndex , byName , sqlSupplier );
400
400
}
401
401
@@ -456,7 +456,7 @@ public DefaultGenericExecuteSpec bind(Object bean) {
456
456
457
457
@ Override
458
458
protected ExecuteSpecSupport createInstance (Map <Integer , SettableValue > byIndex , Map <String , SettableValue > byName ,
459
- Supplier <String > sqlSupplier ) {
459
+ Supplier <String > sqlSupplier ) {
460
460
return createGenericExecuteSpec (byIndex , byName , sqlSupplier );
461
461
}
462
462
}
@@ -471,7 +471,7 @@ protected class DefaultTypedExecuteSpec<T> extends ExecuteSpecSupport implements
471
471
private final BiFunction <Row , RowMetadata , T > mappingFunction ;
472
472
473
473
DefaultTypedExecuteSpec (Map <Integer , SettableValue > byIndex , Map <String , SettableValue > byName ,
474
- Supplier <String > sqlSupplier , Class <T > typeToRead ) {
474
+ Supplier <String > sqlSupplier , Class <T > typeToRead ) {
475
475
476
476
super (byIndex , byName , sqlSupplier );
477
477
@@ -480,7 +480,7 @@ protected class DefaultTypedExecuteSpec<T> extends ExecuteSpecSupport implements
480
480
}
481
481
482
482
DefaultTypedExecuteSpec (Map <Integer , SettableValue > byIndex , Map <String , SettableValue > byName ,
483
- Supplier <String > sqlSupplier , BiFunction <Row , RowMetadata , T > mappingFunction ) {
483
+ Supplier <String > sqlSupplier , BiFunction <Row , RowMetadata , T > mappingFunction ) {
484
484
485
485
super (byIndex , byName , sqlSupplier );
486
486
@@ -541,7 +541,7 @@ public DefaultTypedExecuteSpec<T> bind(Object bean) {
541
541
542
542
@ Override
543
543
protected DefaultTypedExecuteSpec <T > createInstance (Map <Integer , SettableValue > byIndex ,
544
- Map <String , SettableValue > byName , Supplier <String > sqlSupplier ) {
544
+ Map <String , SettableValue > byName , Supplier <String > sqlSupplier ) {
545
545
return createTypedExecuteSpec (byIndex , byName , sqlSupplier , typeToRead );
546
546
}
547
547
}
@@ -628,7 +628,7 @@ <R> FetchSpec<R> execute(String sql, BiFunction<Row, RowMetadata, R> mappingFunc
628
628
}
629
629
630
630
protected abstract DefaultSelectSpecSupport createInstance (String table , List <String > projectedFields , Sort sort ,
631
- Pageable page );
631
+ Pageable page );
632
632
}
633
633
634
634
private class DefaultGenericSelectSpec extends DefaultSelectSpecSupport implements GenericSelectSpec {
@@ -695,7 +695,7 @@ private <R> FetchSpec<R> exchange(BiFunction<Row, RowMetadata, R> mappingFunctio
695
695
696
696
@ Override
697
697
protected DefaultGenericSelectSpec createInstance (String table , List <String > projectedFields , Sort sort ,
698
- Pageable page ) {
698
+ Pageable page ) {
699
699
return new DefaultGenericSelectSpec (table , projectedFields , sort , page );
700
700
}
701
701
}
@@ -706,8 +706,7 @@ protected DefaultGenericSelectSpec createInstance(String table, List<String> pro
706
706
@ SuppressWarnings ("unchecked" )
707
707
private class DefaultTypedSelectSpec <T > extends DefaultSelectSpecSupport implements TypedSelectSpec <T > {
708
708
709
- private final @ Nullable
710
- Class <T > typeToRead ;
709
+ private final @ Nullable Class <T > typeToRead ;
711
710
private final BiFunction <Row , RowMetadata , T > mappingFunction ;
712
711
713
712
DefaultTypedSelectSpec (Class <T > typeToRead ) {
@@ -719,12 +718,12 @@ private class DefaultTypedSelectSpec<T> extends DefaultSelectSpecSupport impleme
719
718
}
720
719
721
720
DefaultTypedSelectSpec (String table , List <String > projectedFields , Sort sort , Pageable page ,
722
- BiFunction <Row , RowMetadata , T > mappingFunction ) {
721
+ BiFunction <Row , RowMetadata , T > mappingFunction ) {
723
722
this (table , projectedFields , sort , page , null , mappingFunction );
724
723
}
725
724
726
725
DefaultTypedSelectSpec (String table , List <String > projectedFields , Sort sort , Pageable page , Class <T > typeToRead ,
727
- BiFunction <Row , RowMetadata , T > mappingFunction ) {
726
+ BiFunction <Row , RowMetadata , T > mappingFunction ) {
728
727
super (table , projectedFields , sort , page );
729
728
this .typeToRead = typeToRead ;
730
729
this .mappingFunction = mappingFunction ;
@@ -784,7 +783,7 @@ private <R> FetchSpec<R> exchange(BiFunction<Row, RowMetadata, R> mappingFunctio
784
783
785
784
@ Override
786
785
protected DefaultTypedSelectSpec <T > createInstance (String table , List <String > projectedFields , Sort sort ,
787
- Pageable page ) {
786
+ Pageable page ) {
788
787
return new DefaultTypedSelectSpec <>(table , projectedFields , sort , page , typeToRead , mappingFunction );
789
788
}
790
789
}
@@ -1022,8 +1021,7 @@ private static <T> Flux<T> doInConnectionMany(Connection connection, Function<Co
1022
1021
} catch (R2dbcException e ) {
1023
1022
1024
1023
String sql = getSql (action );
1025
- return Flux .error (new UncategorizedR2dbcException ("doInConnectionMany" , sql , e ) {
1026
- });
1024
+ return Flux .error (new UncategorizedR2dbcException ("doInConnectionMany" , sql , e ));
1027
1025
}
1028
1026
}
1029
1027
@@ -1034,8 +1032,7 @@ private static <T> Mono<T> doInConnection(Connection connection, Function<Connec
1034
1032
} catch (R2dbcException e ) {
1035
1033
1036
1034
String sql = getSql (action );
1037
- return Mono .error (new UncategorizedR2dbcException ("doInConnection" , sql , e ) {
1038
- });
1035
+ return Mono .error (new UncategorizedR2dbcException ("doInConnection" , sql , e ));
1039
1036
}
1040
1037
}
1041
1038
0 commit comments