DATACMNS-990 - Enable builds on JDK 11+.
This commit is contained in:
@@ -62,7 +62,7 @@ import org.springframework.util.StringUtils;
|
||||
@RequiredArgsConstructor
|
||||
class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends PersistentProperty<P>> {
|
||||
|
||||
private static final Predicate<PersistentProperty<?>> IS_ENTITY = it -> it.isEntity();
|
||||
private static final Predicate<PersistentProperty<? extends PersistentProperty<?>>> IS_ENTITY = it -> it.isEntity();
|
||||
|
||||
private final Map<TypeAndPath, PersistentPropertyPath<P>> propertyPaths = new ConcurrentReferenceHashMap<>();
|
||||
private final MappingContext<E, P> context;
|
||||
@@ -289,7 +289,7 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
static class DefaultPersistentPropertyPaths<T, P extends PersistentProperty<P>>
|
||||
implements PersistentPropertyPaths<T, P> {
|
||||
|
||||
private static final Comparator<PersistentPropertyPath<?>> SHORTEST_PATH = Comparator
|
||||
private static final Comparator<PersistentPropertyPath<? extends PersistentProperty<?>>> SHORTEST_PATH = Comparator
|
||||
.comparingInt(PersistentPropertyPath::getLength);
|
||||
|
||||
private final TypeInformation<T> type;
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
import org.springframework.data.spel.ExtensionAwareEvaluationContextProvider;
|
||||
import org.springframework.data.spel.spi.EvaluationContextExtension;
|
||||
import org.springframework.data.util.Streamable;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -101,7 +100,7 @@ public class ExtensionAwareQueryMethodEvaluationContextProvider implements Query
|
||||
* @param arguments must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
private static Map<String, Object> collectVariables(Streamable<? extends Parameter> parameters, Object[] arguments) {
|
||||
private static Map<String, Object> collectVariables(Parameters<?, ?> parameters, Object[] arguments) {
|
||||
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.querydsl.binding;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.assertj.core.api.Assumptions.*;
|
||||
import static org.springframework.test.util.ReflectionTestUtils.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.data.querydsl.SimpleEntityPathResolver;
|
||||
import org.springframework.data.querydsl.User;
|
||||
import org.springframework.data.querydsl.Users;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.Version;
|
||||
import org.springframework.format.support.DefaultFormattingConversionService;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
@@ -46,6 +48,7 @@ import com.querydsl.core.types.Predicate;
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class QuerydslPredicateBuilderUnitTests {
|
||||
|
||||
@@ -81,6 +84,9 @@ public class QuerydslPredicateBuilderUnitTests {
|
||||
@Test // DATACMNS-669
|
||||
public void resolveArgumentShouldCreateSingleStringParameterPredicateCorrectly() throws Exception {
|
||||
|
||||
assumeThat(Version.javaVersion().toString())
|
||||
.as("QueryDSL isn't Java 11 ready https://github.com/querydsl/querydsl/issues/2151").startsWith("1.8");
|
||||
|
||||
values.add("firstname", "Oliver");
|
||||
|
||||
Predicate predicate = builder.getPredicate(USER_TYPE, values, DEFAULT_BINDINGS);
|
||||
@@ -95,6 +101,9 @@ public class QuerydslPredicateBuilderUnitTests {
|
||||
@Test // DATACMNS-669
|
||||
public void resolveArgumentShouldCreateNestedStringParameterPredicateCorrectly() throws Exception {
|
||||
|
||||
assumeThat(Version.javaVersion().toString())
|
||||
.as("QueryDSL isn't Java 11 ready https://github.com/querydsl/querydsl/issues/2151").startsWith("1.8");
|
||||
|
||||
values.add("address.city", "Linz");
|
||||
|
||||
Predicate predicate = builder.getPredicate(USER_TYPE, values, DEFAULT_BINDINGS);
|
||||
|
||||
Reference in New Issue
Block a user