@@ -182,19 +182,6 @@ private static RuntimeException potentiallyConvertRuntimeException(RuntimeExcept
182
182
return resolved == null ? ex : resolved ;
183
183
}
184
184
185
- private String resolveTargetDatabaseName (@ Nullable String parameterTargetDatabase ) {
186
- if (parameterTargetDatabase != null ) {
187
- return parameterTargetDatabase ;
188
- }
189
- if (databaseSelectionProvider != null ) {
190
- String databaseSelectionProviderValue = databaseSelectionProvider .getDatabaseSelection ().getValue ();
191
- if (databaseSelectionProviderValue != null ) {
192
- return databaseSelectionProviderValue ;
193
- }
194
- }
195
- return DatabaseSelectionProvider .getDefaultSelectionProvider ().getDatabaseSelection ().getValue ();
196
- }
197
-
198
185
class DefaultRunnableSpec implements RunnableSpec {
199
186
200
187
private RunnableStatement runnableStatement ;
@@ -271,6 +258,19 @@ public ResultSummary run() {
271
258
throw potentiallyConvertRuntimeException (e , persistenceExceptionTranslator );
272
259
}
273
260
}
261
+
262
+ private String resolveTargetDatabaseName (@ Nullable String parameterTargetDatabase ) {
263
+ if (parameterTargetDatabase != null ) {
264
+ return parameterTargetDatabase ;
265
+ }
266
+ if (databaseSelectionProvider != null ) {
267
+ String databaseSelectionProviderValue = databaseSelectionProvider .getDatabaseSelection ().getValue ();
268
+ if (databaseSelectionProviderValue != null ) {
269
+ return databaseSelectionProviderValue ;
270
+ }
271
+ }
272
+ return DatabaseSelectionProvider .getDefaultSelectionProvider ().getDatabaseSelection ().getValue ();
273
+ }
274
274
}
275
275
276
276
class DefaultRecordFetchSpec <T > implements RecordFetchSpec <T >, MappingSpec <T > {
@@ -359,7 +359,7 @@ class DefaultRunnableDelegation<T> implements RunnableDelegation<T>, OngoingDele
359
359
360
360
DefaultRunnableDelegation (Function <QueryRunner , Optional <T >> callback , @ Nullable String targetDatabase ) {
361
361
this .callback = callback ;
362
- this .targetDatabase = Neo4jClient .verifyDatabaseName (resolveTargetDatabaseName ( targetDatabase ) );
362
+ this .targetDatabase = Neo4jClient .verifyDatabaseName (targetDatabase );
363
363
}
364
364
365
365
@ Override
0 commit comments