1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Polish diamond operator usage

This commit is contained in:
Tran Ngoc Nhan
2024-10-11 21:44:08 +07:00
committed by Josh Cummings
parent f3e95c8175
commit 31f8caec5f
24 changed files with 42 additions and 44 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
* Copyright 2004-2024 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -138,7 +138,6 @@ public class LoginUrlAuthenticationEntryPoint implements AuthenticationEntryPoin
logger.debug(LogMessage.format("Server side forward to: %s", loginForm));
RequestDispatcher dispatcher = request.getRequestDispatcher(loginForm);
dispatcher.forward(request, response);
return;
}
protected String buildRedirectUrlToLoginPage(HttpServletRequest request, HttpServletResponse response,
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -129,7 +129,7 @@ final class DefaultWASUsernameAndGroupsExtractor implements WASUsernameAndGroups
final Collection<String> groups = (Collection<String>) invokeMethod(getGroupsForUserMethod(), userReg,
new Object[] { securityName });
logger.debug(LogMessage.format("Groups for user %s: %s", securityName, groups));
return new ArrayList<String>(groups);
return new ArrayList<>(groups);
}
catch (Exception ex) {
logger.error("Exception occured while looking up groups for user", ex);
@@ -737,7 +737,7 @@ public class StrictHttpFirewall implements HttpFirewall {
validateAllowedHeaderName(name);
}
Enumeration<String> headers = super.getHeaders(name);
return new Enumeration<String>() {
return new Enumeration<>() {
@Override
public boolean hasMoreElements() {
@@ -757,7 +757,7 @@ public class StrictHttpFirewall implements HttpFirewall {
@Override
public Enumeration<String> getHeaderNames() {
Enumeration<String> names = super.getHeaderNames();
return new Enumeration<String>() {
return new Enumeration<>() {
@Override
public boolean hasMoreElements() {
@@ -803,7 +803,7 @@ public class StrictHttpFirewall implements HttpFirewall {
@Override
public Enumeration<String> getParameterNames() {
Enumeration<String> paramaterNames = super.getParameterNames();
return new Enumeration<String>() {
return new Enumeration<>() {
@Override
public boolean hasMoreElements() {
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2018 the original author or authors.
* Copyright 2015-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ import org.springframework.security.web.authentication.preauth.PreAuthenticatedA
*/
class PreAuthenticatedAuthenticationTokenDeserializer extends JsonDeserializer<PreAuthenticatedAuthenticationToken> {
private static final TypeReference<List<GrantedAuthority>> GRANTED_AUTHORITY_LIST = new TypeReference<List<GrantedAuthority>>() {
private static final TypeReference<List<GrantedAuthority>> GRANTED_AUTHORITY_LIST = new TypeReference<>() {
};
/**