From 86dbff0a816c081f3ee3afddff11e46ccfab5673 Mon Sep 17 00:00:00 2001 From: tiffany jernigan Date: Mon, 8 Jan 2024 23:21:05 +0100 Subject: [PATCH] Remove unnecessary Autowired from Constructors --- .../conductor/contribs/tasks/kafka/KafkaProducerManager.java | 2 -- .../conductor/contribs/tasks/kafka/KafkaPublishTask.java | 2 -- .../conductor/core/execution/mapper/KafkaPublishTaskMapper.java | 2 -- .../listener/archive/ArchivingWorkflowListenerProperties.java | 2 -- 4 files changed, 8 deletions(-) diff --git a/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaProducerManager.java b/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaProducerManager.java index 4fff704b..98355682 100644 --- a/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaProducerManager.java +++ b/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaProducerManager.java @@ -23,7 +23,6 @@ import org.apache.kafka.clients.producer.ProducerConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -52,7 +51,6 @@ public class KafkaProducerManager { } }; - @Autowired public KafkaProducerManager( @Value("${conductor.tasks.kafka-publish.requestTimeout:100ms}") Duration requestTimeout, @Value("${conductor.tasks.kafka-publish.maxBlock:500ms}") Duration maxBlock, diff --git a/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaPublishTask.java b/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaPublishTask.java index 252e6dd8..7bfe8b68 100644 --- a/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaPublishTask.java +++ b/task/kafka/src/main/java/com/netflix/conductor/contribs/tasks/kafka/KafkaPublishTask.java @@ -30,7 +30,6 @@ import org.apache.kafka.common.serialization.StringSerializer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.netflix.conductor.core.execution.WorkflowExecutor; @@ -65,7 +64,6 @@ public class KafkaPublishTask extends WorkflowSystemTask { private final String requestParameter; private final KafkaProducerManager producerManager; - @Autowired public KafkaPublishTask(KafkaProducerManager clientManager, ObjectMapper objectMapper) { super(TASK_TYPE_KAFKA_PUBLISH); this.requestParameter = REQUEST_PARAMETER_NAME; diff --git a/task/kafka/src/main/java/com/netflix/conductor/core/execution/mapper/KafkaPublishTaskMapper.java b/task/kafka/src/main/java/com/netflix/conductor/core/execution/mapper/KafkaPublishTaskMapper.java index d607d9b7..829ccb03 100644 --- a/task/kafka/src/main/java/com/netflix/conductor/core/execution/mapper/KafkaPublishTaskMapper.java +++ b/task/kafka/src/main/java/com/netflix/conductor/core/execution/mapper/KafkaPublishTaskMapper.java @@ -19,7 +19,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.netflix.conductor.common.metadata.tasks.TaskDef; @@ -40,7 +39,6 @@ public class KafkaPublishTaskMapper implements TaskMapper { private final ParametersUtils parametersUtils; private final MetadataDAO metadataDAO; - @Autowired public KafkaPublishTaskMapper(ParametersUtils parametersUtils, MetadataDAO metadataDAO) { this.parametersUtils = parametersUtils; this.metadataDAO = metadataDAO; diff --git a/workflow-event-listener/src/main/java/com/netflix/conductor/contribs/listener/archive/ArchivingWorkflowListenerProperties.java b/workflow-event-listener/src/main/java/com/netflix/conductor/contribs/listener/archive/ArchivingWorkflowListenerProperties.java index f687516f..7e2c5e4d 100644 --- a/workflow-event-listener/src/main/java/com/netflix/conductor/contribs/listener/archive/ArchivingWorkflowListenerProperties.java +++ b/workflow-event-listener/src/main/java/com/netflix/conductor/contribs/listener/archive/ArchivingWorkflowListenerProperties.java @@ -14,7 +14,6 @@ import java.time.Duration; import java.time.temporal.ChronoUnit; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.convert.DurationUnit; import org.springframework.core.env.Environment; @@ -24,7 +23,6 @@ public class ArchivingWorkflowListenerProperties { private final Environment environment; - @Autowired public ArchivingWorkflowListenerProperties(Environment environment) { this.environment = environment; }