From fac9733108d85b7f98dd0ca0325124791e151f99 Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Sat, 23 Nov 2019 22:48:45 +0300 Subject: [PATCH] KEYCLOAK-12219 Remove unused imports from classes in module "server-spi-private" --- .../keycloak/authentication/AuthenticationFlowContext.java | 3 --- .../policy/evaluation/DecisionPermissionCollector.java | 1 - .../policy/evaluation/DecisionResultCollector.java | 5 ----- .../PermissionTicketAwareDecisionResultCollector.java | 4 ---- .../authorization/store/AuthorizationStoreFactory.java | 2 -- .../keycloak/broker/provider/AbstractIdentityProvider.java | 1 - .../provider/ExchangeTokenToIdentityProviderToken.java | 1 - .../main/java/org/keycloak/device/DeviceActivityManager.java | 1 - .../org/keycloak/migration/migrators/MigrateTo1_3_0.java | 2 -- .../org/keycloak/migration/migrators/MigrateTo1_8_0.java | 2 -- .../org/keycloak/migration/migrators/MigrateTo3_0_0.java | 2 -- .../org/keycloak/migration/migrators/MigrateTo3_2_0.java | 3 --- .../org/keycloak/migration/migrators/MigrateTo9_0_0.java | 3 --- .../org/keycloak/migration/migrators/MigrationUtils.java | 2 -- .../cache/authorization/CachedStoreProviderFactory.java | 3 --- .../org/keycloak/models/utils/ReadOnlyUserModelDelegate.java | 1 - .../policy/HashAlgorithmPasswordPolicyProviderFactory.java | 1 - .../org/keycloak/storage/adapter/InMemoryUserAdapter.java | 1 - 18 files changed, 38 deletions(-) diff --git a/server-spi-private/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java b/server-spi-private/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java index a4a377c693..d704f44dee 100755 --- a/server-spi-private/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java +++ b/server-spi-private/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java @@ -17,9 +17,7 @@ package org.keycloak.authentication; -import org.keycloak.credential.CredentialModel; import org.keycloak.forms.login.LoginFormsProvider; -import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.FormMessage; @@ -27,7 +25,6 @@ import org.keycloak.sessions.AuthenticationSessionModel; import java.net.URI; import java.util.List; -import java.util.Map; /** * This interface encapsulates information about an execution in an AuthenticationFlow. It is also used to set diff --git a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionPermissionCollector.java b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionPermissionCollector.java index 934da7d022..61d6a26753 100644 --- a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionPermissionCollector.java +++ b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionPermissionCollector.java @@ -31,7 +31,6 @@ import org.keycloak.representations.idm.authorization.Permission; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; diff --git a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionResultCollector.java b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionResultCollector.java index 42609d7417..5f0629b5eb 100644 --- a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionResultCollector.java +++ b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/DecisionResultCollector.java @@ -18,11 +18,6 @@ package org.keycloak.authorization.policy.evaluation; -import java.util.Collection; -import java.util.Map; - -import org.keycloak.authorization.permission.ResourcePermission; - /** * @author Pedro Igor */ diff --git a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/PermissionTicketAwareDecisionResultCollector.java b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/PermissionTicketAwareDecisionResultCollector.java index 274cca4bd9..c432c930c7 100644 --- a/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/PermissionTicketAwareDecisionResultCollector.java +++ b/server-spi-private/src/main/java/org/keycloak/authorization/policy/evaluation/PermissionTicketAwareDecisionResultCollector.java @@ -16,7 +16,6 @@ */ package org.keycloak.authorization.policy.evaluation; -import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -27,18 +26,15 @@ import java.util.stream.Collectors; import org.keycloak.authorization.AuthorizationProvider; import org.keycloak.authorization.identity.Identity; import org.keycloak.authorization.model.PermissionTicket; -import org.keycloak.authorization.model.Policy; import org.keycloak.authorization.model.Resource; import org.keycloak.authorization.model.ResourceServer; import org.keycloak.authorization.model.Scope; -import org.keycloak.authorization.permission.ResourcePermission; import org.keycloak.authorization.store.ResourceStore; import org.keycloak.authorization.store.ScopeStore; import org.keycloak.authorization.store.StoreFactory; import org.keycloak.representations.idm.authorization.AuthorizationRequest; import org.keycloak.representations.idm.authorization.Permission; import org.keycloak.representations.idm.authorization.PermissionTicketToken; -import org.keycloak.representations.idm.authorization.PolicyEnforcementMode; /** * @author Pedro Igor diff --git a/server-spi-private/src/main/java/org/keycloak/authorization/store/AuthorizationStoreFactory.java b/server-spi-private/src/main/java/org/keycloak/authorization/store/AuthorizationStoreFactory.java index 1c9c0df82c..76a3fab2fe 100644 --- a/server-spi-private/src/main/java/org/keycloak/authorization/store/AuthorizationStoreFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/authorization/store/AuthorizationStoreFactory.java @@ -21,12 +21,10 @@ package org.keycloak.authorization.store; import java.util.HashMap; import java.util.Map; -import org.keycloak.authorization.AuthorizationProvider; import org.keycloak.authorization.store.syncronization.ClientApplicationSynchronizer; import org.keycloak.authorization.store.syncronization.RealmSynchronizer; import org.keycloak.authorization.store.syncronization.Synchronizer; import org.keycloak.authorization.store.syncronization.UserSynchronizer; -import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel.ClientRemovedEvent; import org.keycloak.models.RealmModel.RealmRemovedEvent; diff --git a/server-spi-private/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java b/server-spi-private/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java index 00b4ce0bee..8feededf6f 100755 --- a/server-spi-private/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java +++ b/server-spi-private/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java @@ -25,7 +25,6 @@ import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.representations.AccessToken; import org.keycloak.sessions.AuthenticationSessionModel; import javax.ws.rs.core.MediaType; diff --git a/server-spi-private/src/main/java/org/keycloak/broker/provider/ExchangeTokenToIdentityProviderToken.java b/server-spi-private/src/main/java/org/keycloak/broker/provider/ExchangeTokenToIdentityProviderToken.java index d0048b291f..b74c04fe50 100644 --- a/server-spi-private/src/main/java/org/keycloak/broker/provider/ExchangeTokenToIdentityProviderToken.java +++ b/server-spi-private/src/main/java/org/keycloak/broker/provider/ExchangeTokenToIdentityProviderToken.java @@ -20,7 +20,6 @@ import org.keycloak.events.EventBuilder; import org.keycloak.models.ClientModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.representations.AccessToken; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; diff --git a/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java b/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java index 02148e6c36..0ceae7f138 100644 --- a/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java +++ b/server-spi-private/src/main/java/org/keycloak/device/DeviceActivityManager.java @@ -21,7 +21,6 @@ import javax.ws.rs.core.HttpHeaders; import java.io.IOException; import org.jboss.logging.Logger; -import org.keycloak.common.Profile; import org.keycloak.common.util.Base64; import org.keycloak.models.KeycloakContext; import org.keycloak.models.KeycloakSession; diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_3_0.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_3_0.java index ea98f5822b..85dbad4ccf 100755 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_3_0.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_3_0.java @@ -31,8 +31,6 @@ import org.keycloak.storage.UserStorageProviderModel; import javax.naming.directory.SearchControls; import java.util.List; -import java.util.Map; -import java.util.Set; /** * @author Bill Burke diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_8_0.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_8_0.java index d291e1648e..f28bb5479b 100644 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_8_0.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo1_8_0.java @@ -17,7 +17,6 @@ package org.keycloak.migration.migrators; -import org.keycloak.common.util.MultivaluedHashMap; import org.keycloak.component.ComponentModel; import org.keycloak.migration.ModelVersion; import org.keycloak.models.KeycloakSession; @@ -28,7 +27,6 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.storage.UserStorageProviderModel; import java.util.List; -import java.util.Map; /** * @author Marek Posolda diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_0_0.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_0_0.java index 1999dd415c..f9667659cd 100644 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_0_0.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_0_0.java @@ -20,12 +20,10 @@ package org.keycloak.migration.migrators; import org.keycloak.migration.ModelVersion; import org.keycloak.models.ClientModel; -import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.representations.oidc.OIDCClientRepresentation; import java.util.Objects; diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_2_0.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_2_0.java index b2935a1469..13d77e3b35 100644 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_2_0.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo3_2_0.java @@ -23,10 +23,7 @@ import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; -import org.keycloak.migration.ModelVersion; -import org.keycloak.models.KeycloakSession; import org.keycloak.models.PasswordPolicy; -import org.keycloak.models.RealmModel; import org.keycloak.models.utils.DefaultAuthenticationFlows; import org.keycloak.representations.idm.RealmRepresentation; diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo9_0_0.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo9_0_0.java index 445a810588..e0bce1b464 100644 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo9_0_0.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo9_0_0.java @@ -20,8 +20,6 @@ package org.keycloak.migration.migrators; import org.jboss.logging.Logger; import org.keycloak.migration.ModelVersion; import org.keycloak.models.AccountRoles; -import org.keycloak.models.AuthenticationExecutionModel; -import org.keycloak.models.AuthenticationFlowModel; import org.keycloak.models.ClientModel; import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; @@ -30,7 +28,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.representations.idm.RealmRepresentation; -import java.util.Collections; /** * @author Marek Posolda diff --git a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrationUtils.java b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrationUtils.java index fd167d33a0..8326bc6402 100644 --- a/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrationUtils.java +++ b/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrationUtils.java @@ -17,10 +17,8 @@ package org.keycloak.migration.migrators; -import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import java.util.Set; import org.keycloak.Config; import org.keycloak.OAuth2Constants; diff --git a/server-spi-private/src/main/java/org/keycloak/models/cache/authorization/CachedStoreProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/models/cache/authorization/CachedStoreProviderFactory.java index d466f7ae90..b8563cb74c 100644 --- a/server-spi-private/src/main/java/org/keycloak/models/cache/authorization/CachedStoreProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/models/cache/authorization/CachedStoreProviderFactory.java @@ -18,9 +18,6 @@ package org.keycloak.models.cache.authorization; -import org.keycloak.authorization.AuthorizationProvider; -import org.keycloak.authorization.store.StoreFactory; -import org.keycloak.models.KeycloakSession; import org.keycloak.provider.ProviderFactory; /** diff --git a/server-spi-private/src/main/java/org/keycloak/models/utils/ReadOnlyUserModelDelegate.java b/server-spi-private/src/main/java/org/keycloak/models/utils/ReadOnlyUserModelDelegate.java index e687d29e03..ddc613e6f1 100644 --- a/server-spi-private/src/main/java/org/keycloak/models/utils/ReadOnlyUserModelDelegate.java +++ b/server-spi-private/src/main/java/org/keycloak/models/utils/ReadOnlyUserModelDelegate.java @@ -19,7 +19,6 @@ package org.keycloak.models.utils; import org.keycloak.models.GroupModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; -import org.keycloak.models.utils.UserModelDelegate; import org.keycloak.storage.ReadOnlyException; import java.util.List; diff --git a/server-spi-private/src/main/java/org/keycloak/policy/HashAlgorithmPasswordPolicyProviderFactory.java b/server-spi-private/src/main/java/org/keycloak/policy/HashAlgorithmPasswordPolicyProviderFactory.java index 194059b0c6..3a51ee6ef1 100644 --- a/server-spi-private/src/main/java/org/keycloak/policy/HashAlgorithmPasswordPolicyProviderFactory.java +++ b/server-spi-private/src/main/java/org/keycloak/policy/HashAlgorithmPasswordPolicyProviderFactory.java @@ -21,7 +21,6 @@ import org.keycloak.Config; import org.keycloak.credential.hash.PasswordHashProvider; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.ModelException; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; diff --git a/server-spi-private/src/main/java/org/keycloak/storage/adapter/InMemoryUserAdapter.java b/server-spi-private/src/main/java/org/keycloak/storage/adapter/InMemoryUserAdapter.java index 4a0e1fec01..4be9e26021 100644 --- a/server-spi-private/src/main/java/org/keycloak/storage/adapter/InMemoryUserAdapter.java +++ b/server-spi-private/src/main/java/org/keycloak/storage/adapter/InMemoryUserAdapter.java @@ -28,7 +28,6 @@ import org.keycloak.models.utils.DefaultRoles; import org.keycloak.models.utils.RoleUtils; import org.keycloak.storage.ReadOnlyException; -import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.LinkedList;