Use parenthesis with single-arg lambdas
Use regular expression search/replace to ensure all single-arg lambdas have parenthesis. This aligns with the style used in Spring Boot and ensure that single-arg and multi-arg lambdas are consistent. Issue gh-8945
This commit is contained in:
@@ -91,7 +91,7 @@ public class SpringSecurityLdapTemplateITests {
|
||||
@Test
|
||||
public void namingExceptionIsTranslatedCorrectly() {
|
||||
try {
|
||||
this.template.executeReadOnly((ContextExecutor) dirContext -> {
|
||||
this.template.executeReadOnly((ContextExecutor) (dirContext) -> {
|
||||
throw new NamingException();
|
||||
});
|
||||
fail("Expected UncategorizedLdapException on NamingException");
|
||||
|
||||
@@ -184,7 +184,7 @@ public class DefaultLdapAuthoritiesPopulatorTests {
|
||||
|
||||
@Test
|
||||
public void customAuthoritiesMappingFunction() {
|
||||
this.populator.setAuthorityMapper(record -> {
|
||||
this.populator.setAuthorityMapper((record) -> {
|
||||
String dn = record.get(SpringSecurityLdapTemplate.DN_KEY).get(0);
|
||||
String role = record.get(this.populator.getGroupRoleAttribute()).get(0);
|
||||
return new LdapAuthority(role, dn);
|
||||
|
||||
Reference in New Issue
Block a user