Skip to content

Commit cca9cd8

Browse files
committed
DATACMNS-937 - Polishing.
Removed Spring 4.2 guard from QueryExecutionConverter and its unit tests.
1 parent 1d3af0c commit cca9cd8

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/main/java/org/springframework/data/repository/util/QueryExecutionConverters.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@
5959
*/
6060
public abstract class QueryExecutionConverters {
6161

62-
private static final boolean SPRING_4_2_PRESENT = ClassUtils.isPresent(
63-
"org.springframework.core.annotation.AnnotationConfigurationException",
64-
QueryExecutionConverters.class.getClassLoader());
65-
6662
private static final boolean GUAVA_PRESENT = ClassUtils.isPresent("com.google.common.base.Optional",
6763
QueryExecutionConverters.class.getClassLoader());
6864
private static final boolean JDK_8_PRESENT = ClassUtils.isPresent("java.util.Optional",
@@ -90,7 +86,7 @@ public abstract class QueryExecutionConverters {
9086
UNWRAPPERS.add(Jdk8OptionalUnwrapper.INSTANCE);
9187
}
9288

93-
if (JDK_8_PRESENT && SPRING_4_2_PRESENT) {
89+
if (JDK_8_PRESENT) {
9490
WRAPPER_TYPES.add(NullableWrapperToCompletableFutureConverter.getWrapperType());
9591
}
9692

@@ -480,7 +476,7 @@ public Object convert(Object source) {
480476
*
481477
* @author Oliver Gierke
482478
* @author Mark Paluch
483-
* @author 1.13
479+
* @since 1.12
484480
*/
485481
private static enum ScalOptionUnwrapper implements Converter<Object, Object> {
486482

src/test/java/org/springframework/data/repository/util/QueryExecutionConvertersUnitTests.java

-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import static org.hamcrest.CoreMatchers.*;
1919
import static org.junit.Assert.*;
20-
import static org.junit.Assume.*;
2120

2221
import scala.Option;
2322

@@ -27,9 +26,7 @@
2726

2827
import org.junit.Before;
2928
import org.junit.Test;
30-
import org.springframework.core.SpringVersion;
3129
import org.springframework.core.convert.support.DefaultConversionService;
32-
import org.springframework.data.util.Version;
3330
import org.springframework.util.ReflectionUtils;
3431
import org.springframework.util.concurrent.ListenableFuture;
3532

@@ -43,9 +40,6 @@
4340
*/
4441
public class QueryExecutionConvertersUnitTests {
4542

46-
private static final Version SPRING_VERSION = Version.parse(SpringVersion.getVersion());
47-
private static final Version FOUR_DOT_TWO = new Version(4, 2);
48-
4943
DefaultConversionService conversionService;
5044

5145
@Before
@@ -74,9 +68,6 @@ public void registersWrapperTypes() {
7468
*/
7569
@Test
7670
public void registersCompletableFutureAsWrapperTypeOnSpring42OrBetter() {
77-
78-
assumeThat(SPRING_VERSION.isGreaterThanOrEqualTo(FOUR_DOT_TWO), is(true));
79-
8071
assertThat(QueryExecutionConverters.supports(CompletableFuture.class), is(true));
8172
}
8273

0 commit comments

Comments
 (0)