Anonymous type can be replaced with lambda
This commit is contained in:
committed by
Josh Cummings
parent
05f42a4995
commit
fb39d9c255
+1
-5
@@ -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(
|
||||
|
||||
+1
-7
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user