소스 검색

Polish DelegatingAuthenticationConverter

DingHao 10 달 전
부모
커밋
308e408b13
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      web/src/main/java/org/springframework/security/web/authentication/DelegatingAuthenticationConverter.java

+ 1 - 2
web/src/main/java/org/springframework/security/web/authentication/DelegatingAuthenticationConverter.java

@@ -16,7 +16,6 @@
 
 package org.springframework.security.web.authentication;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import jakarta.servlet.http.HttpServletRequest;
@@ -38,7 +37,7 @@ public final class DelegatingAuthenticationConverter implements AuthenticationCo
 
 	public DelegatingAuthenticationConverter(List<AuthenticationConverter> delegates) {
 		Assert.notEmpty(delegates, "delegates cannot be null");
-		this.delegates = new ArrayList<>(delegates);
+		this.delegates = List.copyOf(delegates);
 	}
 
 	public DelegatingAuthenticationConverter(AuthenticationConverter... delegates) {