DATACMNS-937 - Polishing.
Removed Spring 4.2 guard from QueryExecutionConverter and its unit tests.
This commit is contained in:
@@ -61,13 +61,6 @@ import com.google.common.base.Optional;
|
||||
*/
|
||||
public abstract class QueryExecutionConverters {
|
||||
|
||||
private static final boolean SPRING_4_2_PRESENT = ClassUtils.isPresent(
|
||||
"org.springframework.core.annotation.AnnotationConfigurationException",
|
||||
QueryExecutionConverters.class.getClassLoader());
|
||||
|
||||
private static final boolean ASYNC_RESULT_PRESENT = ClassUtils.isPresent(
|
||||
"org.springframework.scheduling.annotation.AsyncResult", QueryExecutionConverters.class.getClassLoader());
|
||||
|
||||
private static final boolean GUAVA_PRESENT = ClassUtils.isPresent("com.google.common.base.Optional",
|
||||
QueryExecutionConverters.class.getClassLoader());
|
||||
private static final boolean JDK_8_PRESENT = ClassUtils.isPresent("java.util.Optional",
|
||||
@@ -100,7 +93,7 @@ public abstract class QueryExecutionConverters {
|
||||
UNWRAPPERS.add(Jdk8OptionalUnwrapper.INSTANCE);
|
||||
}
|
||||
|
||||
if (JDK_8_PRESENT && SPRING_4_2_PRESENT) {
|
||||
if (JDK_8_PRESENT) {
|
||||
WRAPPER_TYPES.add(NullableWrapperToCompletableFutureConverter.getWrapperType());
|
||||
UNWRAPPER_TYPES.add(NullableWrapperToCompletableFutureConverter.getWrapperType());
|
||||
}
|
||||
@@ -189,9 +182,7 @@ public abstract class QueryExecutionConverters {
|
||||
conversionService.addConverter(new NullableWrapperToJavaSlangOptionConverter(conversionService));
|
||||
}
|
||||
|
||||
if (ASYNC_RESULT_PRESENT) {
|
||||
conversionService.addConverter(new NullableWrapperToFutureConverter(conversionService));
|
||||
}
|
||||
conversionService.addConverter(new NullableWrapperToFutureConverter(conversionService));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,7 +510,7 @@ public abstract class QueryExecutionConverters {
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author 1.13
|
||||
* @since 1.12
|
||||
*/
|
||||
private static enum ScalOptionUnwrapper implements Converter<Object, Object> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user