From 4dc3758b55d1240e2ba7d0f1fee24193a7e7a30a Mon Sep 17 00:00:00 2001 From: Vasil Ilchev Date: Wed, 10 Apr 2024 18:35:20 +0300 Subject: [PATCH] Fix sonar complains (#1705) --- .../repository/jpa/RepositoryApplicationConfiguration.java | 5 ++--- .../repository/jpa/management/JpaDeploymentManagement.java | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java index d9800141b..784cfe3cf 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java @@ -807,7 +807,7 @@ public class RepositoryApplicationConfiguration extends JpaBaseConfiguration { @Bean @ConditionalOnMissingBean DeploymentManagement deploymentManagement(final EntityManager entityManager, - final ActionRepository actionRepository, final DistributionSetRepository distributionSetRepository, + final ActionRepository actionRepository, final DistributionSetManagement distributionSetManagement, final TargetRepository targetRepository, final ActionStatusRepository actionStatusRepository, final AuditorAware auditorProvider, final EventPublisherHolder eventPublisherHolder, final AfterTransactionCommitExecutor afterCommit, @@ -815,8 +815,7 @@ public class RepositoryApplicationConfiguration extends JpaBaseConfiguration { final TenantConfigurationManagement tenantConfigurationManagement, final QuotaManagement quotaManagement, final SystemSecurityContext systemSecurityContext, final TenantAware tenantAware, final JpaProperties properties, final RepositoryProperties repositoryProperties) { - return new JpaDeploymentManagement(entityManager, actionRepository, distributionSetManagement, - distributionSetRepository, targetRepository, actionStatusRepository, auditorProvider, + return new JpaDeploymentManagement(entityManager, actionRepository, distributionSetManagement, targetRepository, actionStatusRepository, auditorProvider, eventPublisherHolder, afterCommit, virtualPropertyReplacer, txManager, tenantConfigurationManagement, quotaManagement, systemSecurityContext, tenantAware, properties.getDatabase(), repositoryProperties); } diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management/JpaDeploymentManagement.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management/JpaDeploymentManagement.java index d98895362..8dabfdb20 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management/JpaDeploymentManagement.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/management/JpaDeploymentManagement.java @@ -140,7 +140,6 @@ public class JpaDeploymentManagement extends JpaActionManagement implements Depl private final EntityManager entityManager; private final DistributionSetManagement distributionSetManagement; - private final DistributionSetRepository distributionSetRepository; private final TargetRepository targetRepository; private final AuditorAware auditorProvider; private final VirtualPropertyReplacer virtualPropertyReplacer; @@ -154,8 +153,7 @@ public class JpaDeploymentManagement extends JpaActionManagement implements Depl private final RetryTemplate retryTemplate; public JpaDeploymentManagement(final EntityManager entityManager, final ActionRepository actionRepository, - final DistributionSetManagement distributionSetManagement, - final DistributionSetRepository distributionSetRepository, final TargetRepository targetRepository, + final DistributionSetManagement distributionSetManagement, final TargetRepository targetRepository, final ActionStatusRepository actionStatusRepository, final AuditorAware auditorProvider, final EventPublisherHolder eventPublisherHolder, final AfterTransactionCommitExecutor afterCommit, final VirtualPropertyReplacer virtualPropertyReplacer, final PlatformTransactionManager txManager, @@ -164,7 +162,6 @@ public class JpaDeploymentManagement extends JpaActionManagement implements Depl final RepositoryProperties repositoryProperties) { super(actionRepository, actionStatusRepository, quotaManagement, repositoryProperties); this.entityManager = entityManager; - this.distributionSetRepository = distributionSetRepository; this.distributionSetManagement = distributionSetManagement; this.targetRepository = targetRepository; this.auditorProvider = auditorProvider;