Make classes final where possible
Update classes that have private constructors so that they are also declared final. In a few cases, inner-classes used private constructors but were subclassed. These have now been changed to have package-private constructors. Issue gh-8945
This commit is contained in:
+1
-1
@@ -673,7 +673,7 @@ public final class OpenSamlAuthenticationProvider implements AuthenticationProvi
|
||||
*
|
||||
* @since 5.4
|
||||
*/
|
||||
public static class Tuple {
|
||||
public static final class Tuple {
|
||||
|
||||
private final Saml2AuthenticationToken authentication;
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public final class Saml2AuthenticationRequest {
|
||||
/**
|
||||
* A builder for {@link Saml2AuthenticationRequest}.
|
||||
*/
|
||||
public static class Builder {
|
||||
public static final class Builder {
|
||||
|
||||
private String issuer;
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ public class Saml2AuthenticationRequestContext {
|
||||
/**
|
||||
* A builder for {@link Saml2AuthenticationRequestContext}.
|
||||
*/
|
||||
public static class Builder {
|
||||
public static final class Builder {
|
||||
|
||||
private String issuer;
|
||||
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ import static org.springframework.security.saml2.provider.service.registration.S
|
||||
*/
|
||||
public class Saml2PostAuthenticationRequest extends AbstractSaml2AuthenticationRequest {
|
||||
|
||||
private Saml2PostAuthenticationRequest(String samlRequest, String relayState, String authenticationRequestUri) {
|
||||
Saml2PostAuthenticationRequest(String samlRequest, String relayState, String authenticationRequestUri) {
|
||||
super(samlRequest, relayState, authenticationRequestUri);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Saml2PostAuthenticationRequest extends AbstractSaml2AuthenticationR
|
||||
/**
|
||||
* Builder class for a {@link Saml2PostAuthenticationRequest} object.
|
||||
*/
|
||||
public static class Builder extends AbstractSaml2AuthenticationRequest.Builder<Builder> {
|
||||
public static final class Builder extends AbstractSaml2AuthenticationRequest.Builder<Builder> {
|
||||
|
||||
private Builder() {
|
||||
super();
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ import static org.springframework.security.saml2.provider.service.registration.S
|
||||
* @since 5.3
|
||||
* @see Saml2AuthenticationRequestFactory
|
||||
*/
|
||||
public class Saml2RedirectAuthenticationRequest extends AbstractSaml2AuthenticationRequest {
|
||||
public final class Saml2RedirectAuthenticationRequest extends AbstractSaml2AuthenticationRequest {
|
||||
|
||||
private final String sigAlg;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class Saml2RedirectAuthenticationRequest extends AbstractSaml2Authenticat
|
||||
/**
|
||||
* Builder class for a {@link Saml2RedirectAuthenticationRequest} object.
|
||||
*/
|
||||
public static class Builder extends AbstractSaml2AuthenticationRequest.Builder<Builder> {
|
||||
public static final class Builder extends AbstractSaml2AuthenticationRequest.Builder<Builder> {
|
||||
|
||||
private String sigAlg;
|
||||
|
||||
|
||||
+3
-1
@@ -28,6 +28,8 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.security.saml2.core.Saml2X509Credential;
|
||||
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration.AssertingPartyDetails;
|
||||
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration.ProviderDetails;
|
||||
import org.springframework.security.saml2.provider.service.servlet.filter.Saml2WebSsoAuthenticationFilter;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -69,7 +71,7 @@ import org.springframework.util.Assert;
|
||||
* @author Josh Cummings
|
||||
* @since 5.2
|
||||
*/
|
||||
public class RelyingPartyRegistration {
|
||||
public final class RelyingPartyRegistration {
|
||||
|
||||
private final String registrationId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user