Skip to content

Commit f91ace6

Browse files
committed
Adopt to deprecation removals in Commons.
Closes #519
1 parent 8ed92d1 commit f91ace6

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/main/java/org/springframework/data/ldap/repository/support/LdapRepositoryFactory.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@
4040
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
4141
import org.springframework.data.repository.query.QueryLookupStrategy;
4242
import org.springframework.data.repository.query.QueryLookupStrategy.Key;
43-
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
4443
import org.springframework.data.repository.query.RepositoryQuery;
4544
import org.springframework.data.repository.query.ValueExpressionDelegate;
46-
import org.springframework.lang.Nullable;
4745
import org.springframework.ldap.core.LdapOperations;
4846
import org.springframework.util.Assert;
4947

@@ -146,15 +144,15 @@ protected Object getTargetRepository(RepositoryInformation information) {
146144
ldapOperations.getObjectDirectoryMapper(), information.getDomainType());
147145
}
148146

149-
return getTargetRepositoryViaReflection(information, ldapOperations,
150-
ldapOperations.getObjectDirectoryMapper(),
147+
return getTargetRepositoryViaReflection(information, ldapOperations, ldapOperations.getObjectDirectoryMapper(),
151148
information.getDomainType());
152149
}
153150

154151
@Override
155152
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(Key key,
156153
ValueExpressionDelegate valueExpressionDelegate) {
157-
return Optional.of(new LdapQueryLookupStrategy(ldapOperations, instantiators, mappingContext, valueExpressionDelegate));
154+
return Optional
155+
.of(new LdapQueryLookupStrategy(ldapOperations, instantiators, mappingContext, valueExpressionDelegate));
158156
}
159157

160158
/**
@@ -183,8 +181,8 @@ private static boolean acceptsMappingContext(RepositoryInformation information)
183181
return acceptsMappingContext;
184182
}
185183

186-
private record LdapQueryLookupStrategy(LdapOperations ldapOperations,
187-
EntityInstantiators instantiators, MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext,
184+
private record LdapQueryLookupStrategy(LdapOperations ldapOperations, EntityInstantiators instantiators,
185+
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext,
188186
ValueExpressionDelegate valueExpressionDelegate) implements QueryLookupStrategy {
189187

190188
@Override
@@ -195,7 +193,8 @@ public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata,
195193
Class<?> domainType = metadata.getDomainType();
196194

197195
if (queryMethod.hasQueryAnnotation()) {
198-
return new AnnotatedLdapRepositoryQuery(queryMethod, domainType, ldapOperations, mappingContext, instantiators, valueExpressionDelegate);
196+
return new AnnotatedLdapRepositoryQuery(queryMethod, domainType, ldapOperations, mappingContext, instantiators,
197+
valueExpressionDelegate);
199198
} else {
200199
return new PartTreeLdapRepositoryQuery(queryMethod, domainType, ldapOperations, mappingContext, instantiators);
201200
}

src/test/java/org/springframework/data/ldap/repository/config/LdapRepositoryConfigurationExtensionUnitTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class LdapRepositoryConfigurationExtensionUnitTests {
4747
private BeanDefinitionRegistry registry = new DefaultListableBeanFactory();
4848

4949
private RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(metadata,
50-
EnableLdapRepositories.class, loader, environment, registry);
50+
EnableLdapRepositories.class, loader, environment, registry, null);
5151

5252
@Test // DATALDAP-60
5353
void isStrictMatchIfDomainTypeIsAnnotatedWithEntry() {

0 commit comments

Comments
 (0)