diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/x509/AbstractX509ClientCertificateAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/x509/AbstractX509ClientCertificateAuthenticator.java index bbaa98b5b7..dfcc345690 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/x509/AbstractX509ClientCertificateAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/x509/AbstractX509ClientCertificateAuthenticator.java @@ -137,13 +137,13 @@ public abstract class AbstractX509ClientCertificateAuthenticator implements Auth return null; }; - private static final Function getSerialnumberFunc(X509AuthenticatorConfigModel config) { + private static Function getSerialnumberFunc(X509AuthenticatorConfigModel config) { return config.isSerialnumberHex() ? certs -> Hex.toHexString(certs[0].getSerialNumber().toByteArray()) : certs -> certs[0].getSerialNumber().toString(); } - private static final Function getIssuerDNFunc(X509AuthenticatorConfigModel config) { + private static Function getIssuerDNFunc(X509AuthenticatorConfigModel config) { return config.isCanonicalDnEnabled() ? certs -> certs[0].getIssuerX500Principal().getName(X500Principal.CANONICAL) : certs -> certs[0].getIssuerDN().getName(); diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/x509/CertificateValidator.java b/services/src/main/java/org/keycloak/authentication/authenticators/x509/CertificateValidator.java index 7a7ed30e77..5f5a8099d2 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/x509/CertificateValidator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/x509/CertificateValidator.java @@ -136,7 +136,7 @@ public class CertificateValidator { } } - public static abstract class OCSPChecker { + public abstract static class OCSPChecker { /** * Requests certificate revocation status using OCSP. The OCSP responder URI * is obtained from the certificate's AIA extension. @@ -147,7 +147,7 @@ public class CertificateValidator { public abstract OCSPUtils.OCSPRevocationStatus check(X509Certificate cert, X509Certificate issuerCertificate) throws CertPathValidatorException; } - public static abstract class CRLLoaderImpl { + public abstract static class CRLLoaderImpl { /** * Returns a collection of {@link X509CRL} * @return diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509AuthenticatorConfigModel.java b/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509AuthenticatorConfigModel.java index 5826d634fc..3b980b6953 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509AuthenticatorConfigModel.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509AuthenticatorConfigModel.java @@ -70,7 +70,7 @@ public class X509AuthenticatorConfigModel extends AuthenticatorConfigModel { this.name = name; } public String getName() { return this.name; } - static public MappingSourceType parse(String name) throws IllegalArgumentException, IndexOutOfBoundsException { + public static MappingSourceType parse(String name) throws IllegalArgumentException, IndexOutOfBoundsException { if (name == null || name.trim().length() == 0) throw new IllegalArgumentException("name"); diff --git a/services/src/main/java/org/keycloak/partialimport/PartialImport.java b/services/src/main/java/org/keycloak/partialimport/PartialImport.java index c03e53fe7b..b189fe41e2 100644 --- a/services/src/main/java/org/keycloak/partialimport/PartialImport.java +++ b/services/src/main/java/org/keycloak/partialimport/PartialImport.java @@ -38,9 +38,9 @@ public interface PartialImport { * @throws ErrorResponseException If the PartialImport can not be performed, * throw this exception. */ - public void prepare(PartialImportRepresentation rep, - RealmModel realm, - KeycloakSession session) throws ErrorResponseException; + void prepare(PartialImportRepresentation rep, + RealmModel realm, + KeycloakSession session) throws ErrorResponseException; /** * Delete resources that will be overwritten. This is done separately so @@ -52,7 +52,7 @@ public interface PartialImport { * @param realm Realm to be imported into. * @param session The KeycloakSession */ - public void removeOverwrites(RealmModel realm, KeycloakSession session); + void removeOverwrites(RealmModel realm, KeycloakSession session); /** * Create (or re-create) all the imported resources. @@ -63,7 +63,7 @@ public interface PartialImport { * @return The final results of the PartialImport request. * @throws ErrorResponseException if an error was detected trying to doImport a resource. */ - public PartialImportResults doImport(PartialImportRepresentation rep, - RealmModel realm, - KeycloakSession session) throws ErrorResponseException; + PartialImportResults doImport(PartialImportRepresentation rep, + RealmModel realm, + KeycloakSession session) throws ErrorResponseException; } diff --git a/services/src/main/java/org/keycloak/protocol/docker/installation/compose/DockerCertFileUtils.java b/services/src/main/java/org/keycloak/protocol/docker/installation/compose/DockerCertFileUtils.java index 66870899db..9542bbc816 100644 --- a/services/src/main/java/org/keycloak/protocol/docker/installation/compose/DockerCertFileUtils.java +++ b/services/src/main/java/org/keycloak/protocol/docker/installation/compose/DockerCertFileUtils.java @@ -11,7 +11,7 @@ public final class DockerCertFileUtils { public static final String END_CERT = "-----END CERTIFICATE-----"; public static final String BEGIN_PRIVATE_KEY = "-----BEGIN PRIVATE KEY-----"; public static final String END_PRIVATE_KEY = "-----END PRIVATE KEY-----"; - public final static String LINE_SEPERATOR = System.getProperty("line.separator"); + public static final String LINE_SEPERATOR = System.getProperty("line.separator"); private DockerCertFileUtils() { } diff --git a/services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java b/services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java index bbc3425476..8cb15fc6c7 100755 --- a/services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java +++ b/services/src/main/java/org/keycloak/protocol/saml/SamlProtocol.java @@ -509,8 +509,8 @@ public class SamlProtocol implements LoginProtocol { } public static class ProtocolMapperProcessor { - final public T mapper; - final public ProtocolMapperModel model; + public final T mapper; + public final ProtocolMapperModel model; public ProtocolMapperProcessor(T mapper, ProtocolMapperModel model) { this.mapper = mapper; diff --git a/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLGroupNameMapper.java b/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLGroupNameMapper.java index aa1fa3fd63..17cae53ab0 100755 --- a/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLGroupNameMapper.java +++ b/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLGroupNameMapper.java @@ -25,5 +25,5 @@ import org.keycloak.models.ProtocolMapperModel; * @version $Revision: 1 $ */ public interface SAMLGroupNameMapper { - public String mapName(ProtocolMapperModel model, GroupModel group); + String mapName(ProtocolMapperModel model, GroupModel group); } diff --git a/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLRoleNameMapper.java b/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLRoleNameMapper.java index dee9015f7f..87e940269f 100755 --- a/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLRoleNameMapper.java +++ b/services/src/main/java/org/keycloak/protocol/saml/mappers/SAMLRoleNameMapper.java @@ -25,5 +25,5 @@ import org.keycloak.models.RoleModel; * @version $Revision: 1 $ */ public interface SAMLRoleNameMapper { - public String mapName(ProtocolMapperModel model, RoleModel role); + String mapName(ProtocolMapperModel model, RoleModel role); }