1
0
mirror of synced 2026-08-04 09:17:02 +00:00

Use diamond type

This commit is contained in:
Johnny Lim
2017-11-20 02:25:30 +09:00
committed by Rob Winch
parent cfe40358bd
commit 57353d18e5
221 changed files with 423 additions and 428 deletions
@@ -208,7 +208,7 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
MessageExtension ext = authSuccess.getExtension(AxMessage.OPENID_NS_AX);
if (ext instanceof FetchResponse) {
FetchResponse fetchResp = (FetchResponse) ext;
attributes = new ArrayList<OpenIDAttribute>(attributesToFetch.size());
attributes = new ArrayList<>(attributesToFetch.size());
for (OpenIDAttribute attr : attributesToFetch) {
List<String> values = fetchResp.getAttributeValues(attr.getName());
@@ -104,7 +104,7 @@ public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessing
if (returnToUrlParameters.isEmpty()
&& getRememberMeServices() instanceof AbstractRememberMeServices) {
returnToUrlParameters = new HashSet<String>();
returnToUrlParameters = new HashSet<>();
returnToUrlParameters
.add(((AbstractRememberMeServices) getRememberMeServices())
.getParameter());
@@ -136,7 +136,7 @@ public class OpenIDAuthenticationProvider
* Used to load the {@code UserDetails} for the authenticated OpenID user.
*/
public void setUserDetailsService(UserDetailsService userDetailsService) {
this.userDetailsService = new UserDetailsByNameServiceWrapper<OpenIDAuthenticationToken>(
this.userDetailsService = new UserDetailsByNameServiceWrapper<>(
userDetailsService);
}
@@ -46,7 +46,7 @@ public class OpenIDAuthenticationToken extends AbstractAuthenticationToken {
public OpenIDAuthenticationToken(OpenIDAuthenticationStatus status,
String identityUrl, String message, List<OpenIDAttribute> attributes) {
super(new ArrayList<GrantedAuthority>(0));
super(new ArrayList<>(0));
this.principal = identityUrl;
this.status = status;
this.identityUrl = identityUrl;
@@ -104,7 +104,7 @@ public class OpenIDAuthenticationProviderTests {
public void testAuthenticateFailure() {
OpenIDAuthenticationProvider provider = new OpenIDAuthenticationProvider();
provider.setAuthenticationUserDetailsService(
new UserDetailsByNameServiceWrapper<OpenIDAuthenticationToken>(
new UserDetailsByNameServiceWrapper<>(
new MockUserDetailsService()));
Authentication preAuth = new OpenIDAuthenticationToken(