Skip to content

Commit

Permalink
Polish DelegatingAuthenticationConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
kse-music committed Oct 18, 2024
1 parent a6ee985 commit e3d1258
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.springframework.security.web.authentication;

import java.util.ArrayList;
import java.util.List;

import jakarta.servlet.http.HttpServletRequest;
Expand All @@ -38,12 +37,11 @@ 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 = delegates;
}

public DelegatingAuthenticationConverter(AuthenticationConverter... delegates) {
Assert.notEmpty(delegates, "delegates cannot be null");
this.delegates = List.of(delegates);
this(List.of(delegates));
}

@Override
Expand Down

0 comments on commit e3d1258

Please sign in to comment.