Use diamond type
This commit is contained in:
@@ -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());
|
||||
|
||||
+1
-1
@@ -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());
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user