Anonymous type can be replaced with lambda
This commit is contained in:
committed by
Josh Cummings
parent
05f42a4995
commit
fb39d9c255
@@ -85,11 +85,8 @@ public class SpringSecurityLdapTemplateITests extends AbstractLdapIntegrationTes
|
||||
@Test
|
||||
public void namingExceptionIsTranslatedCorrectly() {
|
||||
try {
|
||||
template.executeReadOnly(new ContextExecutor() {
|
||||
public Object executeWithContext(DirContext dirContext)
|
||||
throws NamingException {
|
||||
throw new NamingException();
|
||||
}
|
||||
template.executeReadOnly((ContextExecutor) dirContext -> {
|
||||
throw new NamingException();
|
||||
});
|
||||
fail("Expected UncategorizedLdapException on NamingException");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user