1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Anonymous type can be replaced with lambda

This commit is contained in:
Lars Grefer
2019-08-06 23:40:48 +02:00
committed by Josh Cummings
parent 05f42a4995
commit fb39d9c255
53 changed files with 347 additions and 722 deletions
@@ -176,11 +176,7 @@ public class OpenID4JavaConsumerTests {
new NullAxFetchListFactory());
VerificationResult vr = mock(VerificationResult.class);
DiscoveryInformation di = mock(DiscoveryInformation.class);
Identifier id = new Identifier() {
public String getIdentifier() {
return "id";
}
};
Identifier id = (Identifier) () -> "id";
Message msg = mock(Message.class);
when(
@@ -29,8 +29,6 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
public class OpenIDAuthenticationFilterTests {
@@ -50,11 +48,7 @@ public class OpenIDAuthenticationFilterTests {
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
filter.setAuthenticationSuccessHandler(new SavedRequestAwareAuthenticationSuccessHandler());
successHandler.setDefaultTargetUrl(DEFAULT_TARGET_URL);
filter.setAuthenticationManager(new AuthenticationManager() {
public Authentication authenticate(Authentication a) {
return a;
}
});
filter.setAuthenticationManager(a -> a);
filter.afterPropertiesSet();
}