DATACMNS-937 - Polishing.

Removed Spring 4.2 guard from QueryExecutionConverter and its unit tests.
This commit is contained in:
Oliver Gierke
2016-11-19 12:46:49 +01:00
parent 71fc87ad42
commit e009471aaa
2 changed files with 3 additions and 21 deletions

View File

@@ -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> {