From 269a72d672c9b391d6ca44c69dad3c109384eed5 Mon Sep 17 00:00:00 2001 From: testn Date: Mon, 17 Aug 2020 10:09:34 +0700 Subject: [PATCH] KEYCLOAK-15184: Use static inner class where possible --- .../org/keycloak/adapters/authorization/PolicyEnforcer.java | 2 +- .../jetty/core/AbstractKeycloakJettyAuthenticator.java | 2 +- .../adapters/saml/jetty/AbstractSamlAuthenticator.java | 2 +- .../org/keycloak/storage/ldap/LDAPIdentityStoreRegistry.java | 2 +- .../infinispan/InfinispanPublicKeyStorageProviderFactory.java | 2 +- .../infinispan/events/SessionEventsSenderTransaction.java | 2 +- .../sessions/infinispan/remotestore/RemoteCacheInvoker.java | 2 +- .../org/keycloak/dom/saml/v2/assertion/AuthnContextType.java | 2 +- .../main/java/org/keycloak/rotation/CompositeKeyLocator.java | 2 +- .../java/org/keycloak/saml/common/util/TransformerUtil.java | 2 +- .../saml/processing/api/saml/v2/response/SAML2Response.java | 2 +- .../core/parsers/saml/assertion/SAMLAuthnContextParser.java | 4 ++-- .../saml/processing/core/saml/v2/util/StatementUtil.java | 2 +- .../src/main/java/org/keycloak/models/utils/TimeBasedOTP.java | 2 +- .../keycloak/authorization/admin/PolicyEvaluationService.java | 2 +- .../protection/introspect/RPTIntrospectionProvider.java | 4 ++-- .../email/freemarker/FreeMarkerEmailTemplateProvider.java | 2 +- .../freemarker/model/AccountFederatedIdentityBean.java | 2 +- .../src/main/java/org/keycloak/keys/DefaultKeyManager.java | 2 +- .../main/java/org/keycloak/protocol/oidc/TokenManager.java | 2 +- .../org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java | 2 +- .../keycloak/services/managers/UserStorageSyncManager.java | 2 +- services/src/main/java/org/keycloak/theme/FreeMarkerUtil.java | 2 +- .../keycloak/truststore/FileTruststoreProviderFactory.java | 2 +- .../keycloak/validation/DefaultClientValidationProvider.java | 2 +- .../testsuite/authorization/TestPolicyProviderFactory.java | 2 +- .../federation/BackwardsCompatibilityUserStorage.java | 2 +- .../arquillian/undertow/lb/SimpleUndertowLoadBalancer.java | 2 +- .../org/keycloak/testsuite/arquillian/TestClassProvider.java | 2 +- .../org/keycloak/testsuite/auth/page/login/LoginForm.java | 2 +- .../keycloak/testsuite/console/page/AdminConsoleRealm.java | 4 ++-- .../keycloak/testsuite/console/page/events/AdminEvents.java | 2 +- .../org/keycloak/testsuite/console/page/events/Config.java | 2 +- .../keycloak/testsuite/console/page/events/LoginEvents.java | 2 +- .../testsuite/drone/KeycloakWebDriverConfigurator.java | 2 +- .../java/org/keycloak/testsuite/KerberosEmbeddedServer.java | 2 +- .../testsuite/util/cli/LoadPersistentSessionsCommand.java | 2 +- .../org/keycloak/util/ldap/RangedAttributeInterceptor.java | 2 +- 38 files changed, 41 insertions(+), 41 deletions(-) diff --git a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PolicyEnforcer.java b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PolicyEnforcer.java index 63e380c1c9..be297eafcd 100644 --- a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PolicyEnforcer.java +++ b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PolicyEnforcer.java @@ -232,7 +232,7 @@ public class PolicyEnforcer { return paths; } - public class PathConfigMatcher extends PathMatcher { + public static class PathConfigMatcher extends PathMatcher { private final Map paths; private final PathCache pathCache; diff --git a/adapters/oidc/jetty/jetty-core/src/main/java/org/keycloak/adapters/jetty/core/AbstractKeycloakJettyAuthenticator.java b/adapters/oidc/jetty/jetty-core/src/main/java/org/keycloak/adapters/jetty/core/AbstractKeycloakJettyAuthenticator.java index 4c3e5de1d3..8cfa7be303 100755 --- a/adapters/oidc/jetty/jetty-core/src/main/java/org/keycloak/adapters/jetty/core/AbstractKeycloakJettyAuthenticator.java +++ b/adapters/oidc/jetty/jetty-core/src/main/java/org/keycloak/adapters/jetty/core/AbstractKeycloakJettyAuthenticator.java @@ -136,7 +136,7 @@ public abstract class AbstractKeycloakJettyAuthenticator extends LoginAuthentica return new DefaultUserIdentity(theSubject, principal, theRoles); } - private class DummyLoginService implements LoginService { + private static class DummyLoginService implements LoginService { @Override public String getName() { return null; diff --git a/adapters/saml/jetty/jetty-core/src/main/java/org/keycloak/adapters/saml/jetty/AbstractSamlAuthenticator.java b/adapters/saml/jetty/jetty-core/src/main/java/org/keycloak/adapters/saml/jetty/AbstractSamlAuthenticator.java index a946c1f955..415c9deaf2 100755 --- a/adapters/saml/jetty/jetty-core/src/main/java/org/keycloak/adapters/saml/jetty/AbstractSamlAuthenticator.java +++ b/adapters/saml/jetty/jetty-core/src/main/java/org/keycloak/adapters/saml/jetty/AbstractSamlAuthenticator.java @@ -149,7 +149,7 @@ public abstract class AbstractSamlAuthenticator extends LoginAuthenticator { } - private class DummyLoginService implements LoginService { + private static class DummyLoginService implements LoginService { @Override public String getName() { return null; diff --git a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPIdentityStoreRegistry.java b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPIdentityStoreRegistry.java index 0c6e4d9a31..bb00804c6b 100644 --- a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPIdentityStoreRegistry.java +++ b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPIdentityStoreRegistry.java @@ -104,7 +104,7 @@ public class LDAPIdentityStoreRegistry { } - private class LDAPIdentityStoreContext { + private static class LDAPIdentityStoreContext { private LDAPIdentityStoreContext(LDAPConfig config, LDAPIdentityStore store) { this.config = config; diff --git a/model/infinispan/src/main/java/org/keycloak/keys/infinispan/InfinispanPublicKeyStorageProviderFactory.java b/model/infinispan/src/main/java/org/keycloak/keys/infinispan/InfinispanPublicKeyStorageProviderFactory.java index c49445fffd..b977214302 100644 --- a/model/infinispan/src/main/java/org/keycloak/keys/infinispan/InfinispanPublicKeyStorageProviderFactory.java +++ b/model/infinispan/src/main/java/org/keycloak/keys/infinispan/InfinispanPublicKeyStorageProviderFactory.java @@ -146,7 +146,7 @@ public class InfinispanPublicKeyStorageProviderFactory implements PublicKeyStora } } - private class SessionAndKeyHolder { + private static class SessionAndKeyHolder { private final KeycloakSession session; private final ArrayList cacheKeys; diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/events/SessionEventsSenderTransaction.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/events/SessionEventsSenderTransaction.java index f98bbe6518..d4a321c752 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/events/SessionEventsSenderTransaction.java +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/events/SessionEventsSenderTransaction.java @@ -61,7 +61,7 @@ public class SessionEventsSenderTransaction extends AbstractKeycloakTransaction } - private class DCEventContext { + private static class DCEventContext { private final ClusterProvider.DCNotify dcNotify; private final SessionClusterEvent event; diff --git a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/remotestore/RemoteCacheInvoker.java b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/remotestore/RemoteCacheInvoker.java index 6dcfb703c5..faf3ce1c0c 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/remotestore/RemoteCacheInvoker.java +++ b/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/remotestore/RemoteCacheInvoker.java @@ -179,7 +179,7 @@ public class RemoteCacheInvoker { } - private class RemoteCacheContext { + private static class RemoteCacheContext { private final RemoteCache remoteCache; private final MaxIdleTimeLoader maxIdleTimeLoader; diff --git a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/assertion/AuthnContextType.java b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/assertion/AuthnContextType.java index 3dccd3c14a..71052c4907 100755 --- a/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/assertion/AuthnContextType.java +++ b/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/assertion/AuthnContextType.java @@ -160,7 +160,7 @@ public class AuthnContextType implements Serializable { * ref="saml:AuthnContextDecl"/> * */ - public class AuthnContextTypeSequence implements Serializable { + public static class AuthnContextTypeSequence implements Serializable { private AuthnContextClassRefType classRef; diff --git a/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java b/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java index c58973b1a9..ac7308327e 100644 --- a/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java +++ b/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java @@ -110,7 +110,7 @@ public class CompositeKeyLocator implements KeyLocator, Iterable { return Collections.unmodifiableCollection(res); } - private class JointKeyIterator implements Iterable { + private static class JointKeyIterator implements Iterable { // based on http://stackoverflow.com/a/34126154/6930869 private final Iterator> iterablesIterator; diff --git a/saml-core/src/main/java/org/keycloak/saml/common/util/TransformerUtil.java b/saml-core/src/main/java/org/keycloak/saml/common/util/TransformerUtil.java index b90db1b714..f6fe90acad 100755 --- a/saml-core/src/main/java/org/keycloak/saml/common/util/TransformerUtil.java +++ b/saml-core/src/main/java/org/keycloak/saml/common/util/TransformerUtil.java @@ -435,7 +435,7 @@ public class TransformerUtil { return null; } - private class CustomHolder { + private static class CustomHolder { public Document doc; public boolean encounteredTextNode = false; diff --git a/saml-core/src/main/java/org/keycloak/saml/processing/api/saml/v2/response/SAML2Response.java b/saml-core/src/main/java/org/keycloak/saml/processing/api/saml/v2/response/SAML2Response.java index 4f356e9c78..e3d3bdeeed 100755 --- a/saml-core/src/main/java/org/keycloak/saml/processing/api/saml/v2/response/SAML2Response.java +++ b/saml-core/src/main/java/org/keycloak/saml/processing/api/saml/v2/response/SAML2Response.java @@ -117,7 +117,7 @@ public class SAML2Response { String authContextDeclRef = JBossSAMLURIConstants.AC_PASSWORD_PROTECTED_TRANSPORT.get(); act.addAuthenticatingAuthority(URI.create(authContextDeclRef)); - AuthnContextType.AuthnContextTypeSequence sequence = act.new AuthnContextTypeSequence(); + AuthnContextType.AuthnContextTypeSequence sequence = new AuthnContextType.AuthnContextTypeSequence(); sequence.setClassRef(new AuthnContextClassRefType(JBossSAMLURIConstants.AC_PASSWORD.getUri())); act.setSequence(sequence); diff --git a/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/assertion/SAMLAuthnContextParser.java b/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/assertion/SAMLAuthnContextParser.java index 16a83bcc1b..05f3ecfe12 100644 --- a/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/assertion/SAMLAuthnContextParser.java +++ b/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/assertion/SAMLAuthnContextParser.java @@ -58,7 +58,7 @@ public class SAMLAuthnContextParser extends AbstractStaxSamlAssertionParser { + private static class ProviderComparator implements Comparator { @Override public int compare(ComponentModel o1, ComponentModel o2) { diff --git a/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java b/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java index d0fadabb34..942aac256d 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java @@ -1025,7 +1025,7 @@ public class TokenManager { } - public class RefreshResult { + public static class RefreshResult { private final AccessTokenResponse response; private final boolean offlineToken; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java index b225e3cf34..8163db916e 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java @@ -1351,7 +1351,7 @@ public class TokenEndpoint { return codeVerifierEncoded; } - private class TokenExchangeSamlProtocol extends SamlProtocol { + private static class TokenExchangeSamlProtocol extends SamlProtocol { final SamlClient samlClient; TokenExchangeSamlProtocol(SamlClient samlClient) { diff --git a/services/src/main/java/org/keycloak/services/managers/UserStorageSyncManager.java b/services/src/main/java/org/keycloak/services/managers/UserStorageSyncManager.java index a7d0e325ca..5c4110fa3a 100755 --- a/services/src/main/java/org/keycloak/services/managers/UserStorageSyncManager.java +++ b/services/src/main/java/org/keycloak/services/managers/UserStorageSyncManager.java @@ -75,7 +75,7 @@ public class UserStorageSyncManager { }); } - private class Holder { + private static class Holder { ExecutionResult result; } diff --git a/services/src/main/java/org/keycloak/theme/FreeMarkerUtil.java b/services/src/main/java/org/keycloak/theme/FreeMarkerUtil.java index 44f62b8f8d..13a8d33b1d 100755 --- a/services/src/main/java/org/keycloak/theme/FreeMarkerUtil.java +++ b/services/src/main/java/org/keycloak/theme/FreeMarkerUtil.java @@ -85,7 +85,7 @@ public class FreeMarkerUtil { return cfg.getTemplate(templateName, "UTF-8"); } - class ThemeTemplateLoader extends URLTemplateLoader { + static class ThemeTemplateLoader extends URLTemplateLoader { private Theme theme; diff --git a/services/src/main/java/org/keycloak/truststore/FileTruststoreProviderFactory.java b/services/src/main/java/org/keycloak/truststore/FileTruststoreProviderFactory.java index c30623302d..054e9fc769 100755 --- a/services/src/main/java/org/keycloak/truststore/FileTruststoreProviderFactory.java +++ b/services/src/main/java/org/keycloak/truststore/FileTruststoreProviderFactory.java @@ -127,7 +127,7 @@ public class FileTruststoreProviderFactory implements TruststoreProviderFactory - private class TruststoreCertificatesLoader { + private static class TruststoreCertificatesLoader { private Map trustedRootCerts = new HashMap<>(); private Map intermediateCerts = new HashMap<>(); diff --git a/services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java b/services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java index 396a5c4efb..184318e8c4 100644 --- a/services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java +++ b/services/src/main/java/org/keycloak/validation/DefaultClientValidationProvider.java @@ -91,7 +91,7 @@ public class DefaultClientValidationProvider implements ClientValidationProvider } } - class ValidationException extends Exception { + static class ValidationException extends Exception { public ValidationException(String message) { super(message, null, false, false); diff --git a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/TestPolicyProviderFactory.java b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/TestPolicyProviderFactory.java index b450b7609d..8fff14dcdf 100644 --- a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/TestPolicyProviderFactory.java +++ b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/authorization/TestPolicyProviderFactory.java @@ -89,7 +89,7 @@ public class TestPolicyProviderFactory implements PolicyProviderFactory { return "test"; } - private class TestPolicyProvider implements PolicyProvider { + private static class TestPolicyProvider implements PolicyProvider { private final AuthorizationProvider authorization; diff --git a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/federation/BackwardsCompatibilityUserStorage.java b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/federation/BackwardsCompatibilityUserStorage.java index f6c1f242cc..9f919228f0 100644 --- a/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/federation/BackwardsCompatibilityUserStorage.java +++ b/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/federation/BackwardsCompatibilityUserStorage.java @@ -378,7 +378,7 @@ public class BackwardsCompatibilityUserStorage implements UserLookupProvider, Us } - class MyUser { + static class MyUser { private String username; private CredentialModel hashedPassword; diff --git a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java index 70e3d326e0..52d4774cdf 100644 --- a/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java +++ b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/lb/SimpleUndertowLoadBalancer.java @@ -315,7 +315,7 @@ public class SimpleUndertowLoadBalancer { private static final AttachmentKey REMAINING_RETRY_ATTEMPTS = AttachmentKey.create(Integer.class); - private class ProxyCallbackDelegate implements ProxyCallback { + private static class ProxyCallbackDelegate implements ProxyCallback { private final ProxyClient proxyClient; private final ProxyCallback delegate; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/TestClassProvider.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/TestClassProvider.java index 1a8877eb74..812674ac39 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/TestClassProvider.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/TestClassProvider.java @@ -43,7 +43,7 @@ public class TestClassProvider { server.stop(); } - public class ClassPathResourceManager implements ResourceManager { + public static class ClassPathResourceManager implements ResourceManager { @Override public Resource getResource(String className) { diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginForm.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginForm.java index 040a899efd..f21b04a953 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginForm.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginForm.java @@ -157,7 +157,7 @@ public class LoginForm extends Form { return getTextFromElement(rememberMeLabel); } - public class TotpSetupForm extends Form { + public static class TotpSetupForm extends Form { @FindBy(id = "totp") private WebElement totpInputField; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/AdminConsoleRealm.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/AdminConsoleRealm.java index 028029550c..9d4e16c1b8 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/AdminConsoleRealm.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/AdminConsoleRealm.java @@ -62,7 +62,7 @@ public class AdminConsoleRealm extends AdminConsoleRealmsRoot { // return realmsResource().realm(getConsoleRealm()); // } - public class ConfigureMenu { + public static class ConfigureMenu { @FindBy(partialLinkText = "Realm Settings") private WebElement realmSettingsLink; @@ -111,7 +111,7 @@ public class AdminConsoleRealm extends AdminConsoleRealmsRoot { return manageMenu; } - public class ManageMenu { + public static class ManageMenu { @FindBy(partialLinkText = "Users") private WebElement usersLink; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/AdminEvents.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/AdminEvents.java index fd8efc6425..7e1ffeb582 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/AdminEvents.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/AdminEvents.java @@ -42,7 +42,7 @@ public class AdminEvents extends Events { return table; } - public class AdminEventsTable extends DataTable { + public static class AdminEventsTable extends DataTable { @FindBy(xpath = "//button[text()[contains(.,'Filter')]]") private WebElement filterButton; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/Config.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/Config.java index dde37a4c07..997f3a7ee9 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/Config.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/Config.java @@ -45,7 +45,7 @@ public class Config extends Events { return form; } - public class ConfigForm extends Form { + public static class ConfigForm extends Form { @FindBy(id = "s2id_autogen1") private WebElement eventListenersInput; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/LoginEvents.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/LoginEvents.java index 2aedca641f..f9128acf5a 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/LoginEvents.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/events/LoginEvents.java @@ -42,7 +42,7 @@ public class LoginEvents extends Events { return table; } - public class LoginEventsTable extends DataTable { + public static class LoginEventsTable extends DataTable { @FindBy(xpath = "//button[text()[contains(.,'Filter')]]") private WebElement filterButton; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/drone/KeycloakWebDriverConfigurator.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/drone/KeycloakWebDriverConfigurator.java index 722a5af512..1d447b3686 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/drone/KeycloakWebDriverConfigurator.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/drone/KeycloakWebDriverConfigurator.java @@ -101,7 +101,7 @@ public class KeycloakWebDriverConfigurator { } } - public class KcBrowserCapabilities implements BrowserCapabilities { + public static class KcBrowserCapabilities implements BrowserCapabilities { private Capabilities capabilitiesToAdd; private BrowserCapabilities origBrowserCapabilities; diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/KerberosEmbeddedServer.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/KerberosEmbeddedServer.java index e114d006e9..c412375ccb 100644 --- a/testsuite/utils/src/main/java/org/keycloak/testsuite/KerberosEmbeddedServer.java +++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/KerberosEmbeddedServer.java @@ -263,7 +263,7 @@ public class KerberosEmbeddedServer extends LDAPEmbeddedServer { * * @author Dominik Pospisil */ - class NoReplayKdcServer extends KdcServer { + static class NoReplayKdcServer extends KdcServer { NoReplayKdcServer(KerberosConfig kdcConfig) { super(kdcConfig); diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/util/cli/LoadPersistentSessionsCommand.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/util/cli/LoadPersistentSessionsCommand.java index 796e3c69cf..041756b69c 100644 --- a/testsuite/utils/src/main/java/org/keycloak/testsuite/util/cli/LoadPersistentSessionsCommand.java +++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/util/cli/LoadPersistentSessionsCommand.java @@ -100,7 +100,7 @@ public class LoadPersistentSessionsCommand extends AbstractCommand { } - private class MyWorker implements Runnable { + private static class MyWorker implements Runnable { private final int workerId; private final int lastCreatedOn; diff --git a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/RangedAttributeInterceptor.java b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/RangedAttributeInterceptor.java index ce29f51b10..29ad949cfa 100644 --- a/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/RangedAttributeInterceptor.java +++ b/util/embedded-ldap/src/main/java/org/keycloak/util/ldap/RangedAttributeInterceptor.java @@ -50,7 +50,7 @@ import org.apache.directory.server.core.api.interceptor.context.SearchOperationC */ public class RangedAttributeInterceptor extends BaseInterceptor { - private class RangedEntryFilteringCursor implements EntryFilteringCursor { + private static class RangedEntryFilteringCursor implements EntryFilteringCursor { private final EntryFilteringCursor c; private final String name;