DATALDAP-21 - Java 8 code cleanup.

Replace explicit type arguments with diamond syntax.
This commit is contained in:
Mark Paluch
2017-01-30 11:10:18 +01:00
parent 27f46fb124
commit 2569ee07eb
4 changed files with 10 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public class LdapRepositoryConfigurationExtension extends RepositoryConfiguratio
*/
@Override
protected Collection<Class<? extends Annotation>> getIdentifyingAnnotations() {
return Collections.<Class<? extends Annotation>> singleton(Entry.class);
return Collections.singleton(Entry.class);
}
/*
@@ -82,7 +82,7 @@ public class LdapRepositoryConfigurationExtension extends RepositoryConfiguratio
*/
@Override
protected Collection<Class<?>> getIdentifyingTypes() {
return Collections.<Class<?>> singleton(LdapRepository.class);
return Collections.singleton(LdapRepository.class);
}
/* (non-Javadoc)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import com.querydsl.core.annotations.QueryEntities;
*
* @author Mattias Hellborg Arthursson
* @author Eddu Melendez
* @author Mark Paluch
*/
@SupportedAnnotationTypes("org.springframework.ldap.odm.annotations.*")
@SupportedSourceVersion(SourceVersion.RELEASE_6)
@@ -49,7 +50,7 @@ public class LdapAnnotationProcessor extends AbstractQuerydslProcessor {
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Running " + getClass().getSimpleName());
DefaultConfiguration configuration = new DefaultLdapAnnotationProcessorConfiguration(roundEnv,
processingEnv.getOptions(), Collections.<String> emptySet(), QueryEntities.class, Entry.class, null, null, null,
processingEnv.getOptions(), Collections.emptySet(), QueryEntities.class, Entry.class, null, null, null,
Transient.class);
configuration.setUseFields(true);
configuration.setUseGetters(false);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016 the original author or authors.
* Copyright 2016-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ import com.querydsl.core.types.Predicate;
*
* @author Mattias Hellborg Arthursson
* @author Eddu Melendez
* @author Mark Paluch
*/
public class QueryDslLdapQuery<K> implements FilteredClause<QueryDslLdapQuery<K>> {
@@ -41,7 +42,7 @@ public class QueryDslLdapQuery<K> implements FilteredClause<QueryDslLdapQuery<K>
private final Class<? extends K> entityType;
private final LdapSerializer filterGenerator;
private QueryMixin<QueryDslLdapQuery<K>> queryMixin = new QueryMixin<QueryDslLdapQuery<K>>(this,
private QueryMixin<QueryDslLdapQuery<K>> queryMixin = new QueryMixin<>(this,
new DefaultQueryMetadata().noValidate());
/**

View File

@@ -92,7 +92,7 @@ public class QueryDslLdapRepository<T> extends SimpleLdapRepository<T> implement
}
private QueryDslLdapQuery<T> queryFor(Predicate predicate) {
return new QueryDslLdapQuery<T>(ldapOperations, entityType).where(predicate);
return new QueryDslLdapQuery<>(ldapOperations, entityType).where(predicate);
}
/* (non-Javadoc)