Remove Implicit Type Parameters

This commit is contained in:
Josh Cummings
2025-01-07 13:41:45 -07:00
parent 9c978b7adc
commit 32081f5edd
69 changed files with 254 additions and 262 deletions

View File

@@ -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;
}

View File

@@ -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));

View File

@@ -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();

View File

@@ -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();

View File

@@ -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");

View File

@@ -28,7 +28,7 @@ public class RoleRepo {
@Transactional
public Map<String, String> queryRoleMap() {
return new HashMap<String, String>();
return new HashMap<>();
}
}

View File

@@ -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));