Polishing.

Uses new switch syntax.

Signed-off-by: mipo256 <mikhailpolivakha@gmail.com>

Commit message changed by Jens Schauder

Original pull request #2000
See #1998
This commit is contained in:
mipo256
2025-02-21 09:29:27 +03:00
committed by Mark Paluch
parent 75fb5ce216
commit cb86d91ff0

View File

@@ -303,18 +303,13 @@ abstract class JdbcQueryLookupStrategy extends RelationalQueryLookupStrategy {
LOG.debug(String.format("Using the queryLookupStrategy %s", keyToUse));
switch (keyToUse) {
case CREATE:
return createQueryLookupStrategy;
case USE_DECLARED_QUERY:
return declaredQueryLookupStrategy;
case CREATE_IF_NOT_FOUND:
return new CreateIfNotFoundQueryLookupStrategy(publisher, callbacks, context, converter, dialect,
queryMappingConfiguration, operations, createQueryLookupStrategy, declaredQueryLookupStrategy,
delegate);
default:
throw new IllegalArgumentException(String.format("Unsupported query lookup strategy %s", key));
}
return switch (keyToUse) {
case CREATE -> createQueryLookupStrategy;
case USE_DECLARED_QUERY -> declaredQueryLookupStrategy;
case CREATE_IF_NOT_FOUND -> new CreateIfNotFoundQueryLookupStrategy(
publisher, callbacks, context, converter, dialect, queryMappingConfiguration, operations,
createQueryLookupStrategy, declaredQueryLookupStrategy, delegate);
};
}
JdbcConverter getConverter() {