Remove Implicit Type Parameters
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -203,7 +203,7 @@ public class IncrementalAttributeMapperITests extends AbstractJUnit4SpringContex
|
||||
TransactionTemplate transactionTemplate = new TransactionTemplate(this.transactionManager);
|
||||
|
||||
try {
|
||||
transactionTemplate.execute(new TransactionCallback<Object>() {
|
||||
transactionTemplate.execute(new TransactionCallback<>() {
|
||||
@Override
|
||||
public Object doInTransaction(TransactionStatus status) {
|
||||
ModificationItem modificationItem = new ModificationItem(DirContext.ADD_ATTRIBUTE,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -100,7 +100,7 @@ public final class SchemaToJavaAdITests {
|
||||
this.contextSource.setPassword(PASSWORD);
|
||||
this.contextSource.setPooled(false);
|
||||
this.contextSource.setBase("dc=261consulting,dc=local");
|
||||
HashMap<String, Object> baseEnvironment = new HashMap<String, Object>() {
|
||||
HashMap<String, Object> baseEnvironment = new HashMap<>() {
|
||||
{
|
||||
put("java.naming.ldap.attributes.binary",
|
||||
"thumbnailLogo replPropertyMetaData partialAttributeSet registeredAddress userPassword telexNumber partialAttributeDeletionList mS-DS-ConsistencyGuid attributeCertificateAttribute thumbnailPhoto teletexTerminalIdentifier replUpToDateVector dSASignature objectGUID");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -51,7 +51,7 @@ public class PagedSearchITests extends AbstractJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private ContextSource contextSource;
|
||||
|
||||
private static final AttributesMapper<String> CN_ATTRIBUTES_MAPPER = new AttributesMapper<String>() {
|
||||
private static final AttributesMapper<String> CN_ATTRIBUTES_MAPPER = new AttributesMapper<>() {
|
||||
@Override
|
||||
public String mapFromAttributes(Attributes attributes) throws NamingException {
|
||||
return attributes.get("cn").get().toString();
|
||||
@@ -77,7 +77,7 @@ public class PagedSearchITests extends AbstractJUnit4SpringContextTests {
|
||||
// There should be three pages of three entries, and one final page with one entry
|
||||
final PagedResultsDirContextProcessor processor = new PagedResultsDirContextProcessor(3);
|
||||
|
||||
SingleContextSource.doWithSingleContext(this.contextSource, new LdapOperationsCallback<Object>() {
|
||||
SingleContextSource.doWithSingleContext(this.contextSource, new LdapOperationsCallback<>() {
|
||||
@Override
|
||||
public Object doWithLdapOperations(LdapOperations operations) {
|
||||
List<String> result = operations.search("ou=People", "(&(objectclass=person))", searchControls,
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ArrayMarshaller<E> implements Marshaller<ArrayTree<E>> {
|
||||
|
||||
if ((data.length == 1) && (data[0] == 0)) {
|
||||
E[] array = (E[]) new Object[] {};
|
||||
ArrayTree<E> tree = new ArrayTree<E>(this.comparator, array);
|
||||
ArrayTree<E> tree = new ArrayTree<>(this.comparator, array);
|
||||
return tree;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public class ArrayMarshaller<E> implements Marshaller<ArrayTree<E>> {
|
||||
}
|
||||
}
|
||||
|
||||
ArrayTree<E> arrayTree = new ArrayTree<E>(this.comparator, nodes);
|
||||
ArrayTree<E> arrayTree = new ArrayTree<>(this.comparator, nodes);
|
||||
|
||||
return arrayTree;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -102,7 +102,7 @@ public class LdapTemplateListITests extends AbstractLdapTemplateIntegrationTests
|
||||
}
|
||||
|
||||
private void verifyBindings(List<String> list) {
|
||||
LinkedList<LdapName> transformed = new LinkedList<LdapName>();
|
||||
LinkedList<LdapName> transformed = new LinkedList<>();
|
||||
|
||||
for (String s : list) {
|
||||
transformed.add(LdapUtils.newLdapName(s));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2022 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -554,13 +554,13 @@ public class LdapTemplateSearchResultITests extends AbstractLdapTemplateIntegrat
|
||||
|
||||
@Test
|
||||
public void verifyThatSearchWithCountLimitReturnsTheEntriesFoundSoFar() {
|
||||
List<Object> result = this.tested.search(
|
||||
LdapQueryBuilder.query().countLimit(3).where("objectclass").is("person"), new ContextMapper<Object>() {
|
||||
@Override
|
||||
public Object mapFromContext(Object ctx) throws NamingException {
|
||||
return new Object();
|
||||
}
|
||||
});
|
||||
List<Object> result = this.tested
|
||||
.search(LdapQueryBuilder.query().countLimit(3).where("objectclass").is("person"), new ContextMapper<>() {
|
||||
@Override
|
||||
public Object mapFromContext(Object ctx) throws NamingException {
|
||||
return new Object();
|
||||
}
|
||||
});
|
||||
|
||||
assertThat(result).hasSize(3);
|
||||
}
|
||||
@@ -569,7 +569,7 @@ public class LdapTemplateSearchResultITests extends AbstractLdapTemplateIntegrat
|
||||
public void verifyThatSearchWithCountLimitWithFlagToFalseThrowsException() {
|
||||
this.tested.setIgnoreSizeLimitExceededException(false);
|
||||
this.tested.search(LdapQueryBuilder.query().countLimit(3).where("objectclass").is("person"),
|
||||
new ContextMapper<Object>() {
|
||||
new ContextMapper<>() {
|
||||
@Override
|
||||
public Object mapFromContext(Object ctx) throws NamingException {
|
||||
return new Object();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -72,7 +72,7 @@ public class SupportedControlsITests extends AbstractLdapTemplateIntegrationTest
|
||||
String[] controls = (String[]) this.tested.lookup("", new String[] { SUPPORTED_CONTROL }, mapper);
|
||||
System.out.println(Arrays.toString(controls));
|
||||
|
||||
HashSet<String> controlsSet = new HashSet<String>(Arrays.asList(controls));
|
||||
HashSet<String> controlsSet = new HashSet<>(Arrays.asList(controls));
|
||||
|
||||
assertThat(controlsSet.contains("1.3.6.1.4.1.4203.1.10.1")).as("Entry Change Notification LDAPv3 control,")
|
||||
.isTrue();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2013 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -129,7 +129,7 @@ public class SimpleLdapTemplateITests extends AbstractLdapTemplateIntegrationTes
|
||||
this.ldapTemplate.modifyAttributes(ctx);
|
||||
|
||||
// verify that the data was properly updated.
|
||||
this.ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<Object>() {
|
||||
this.ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<>() {
|
||||
public Object mapFromContext(Object ctx) {
|
||||
DirContextAdapter adapter = (DirContextAdapter) ctx;
|
||||
assertThat(adapter.getStringAttribute("description")).isEqualTo("updated description");
|
||||
@@ -150,7 +150,7 @@ public class SimpleLdapTemplateITests extends AbstractLdapTemplateIntegrationTes
|
||||
this.ldapTemplate.modifyAttributes(ctx);
|
||||
|
||||
// verify that the data was properly updated.
|
||||
this.ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<Object>() {
|
||||
this.ldapTemplate.lookup("cn=Some Person,ou=company1,ou=Sweden", new ContextMapper<>() {
|
||||
public Object mapFromContext(Object ctx) {
|
||||
DirContextAdapter adapter = (DirContextAdapter) ctx;
|
||||
assertThat(adapter.getStringAttribute("description")).isEqualTo("updated description");
|
||||
|
||||
@@ -28,7 +28,7 @@ public class RoleRepo {
|
||||
|
||||
@Transactional
|
||||
public Map<String, String> queryRoleMap() {
|
||||
return new HashMap<String, String>();
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2016 the original author or authors.
|
||||
* Copyright 2005-2025 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.
|
||||
@@ -130,7 +130,7 @@ public class LdapTemplateOdmGroupManipulationITests extends AbstractLdapTemplate
|
||||
public void testSetMembersSyntacticallyEqual() {
|
||||
Group group = this.tested.findOne(LdapQueryBuilder.query().where("cn").is("ROLE_USER"), Group.class);
|
||||
|
||||
group.setMembers(new HashSet<Name>() {
|
||||
group.setMembers(new HashSet<>() {
|
||||
{
|
||||
add(LdapUtils.newLdapName("CN=Some Person,OU=company1, ou=Sweden, " + base));
|
||||
add(LdapUtils.newLdapName("CN=Some Person2, OU=company1,ou=Sweden," + base));
|
||||
|
||||
Reference in New Issue
Block a user