Skip to content

Commit

Permalink
Remove unnecessary Autowired from Constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffany jernigan committed Jan 8, 2024
1 parent f42a279 commit d7a55e7
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
Expand All @@ -37,7 +36,6 @@ public class EventQueues {
private final ParametersUtils parametersUtils;
private final Map<String, EventQueueProvider> providers;

@Autowired
public EventQueues(
@Qualifier(EVENT_QUEUE_PROVIDERS_QUALIFIER) Map<String, EventQueueProvider> providers,
ParametersUtils parametersUtils) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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;
Expand All @@ -42,7 +41,6 @@ public class DoWhileTaskMapper implements TaskMapper {
private final MetadataDAO metadataDAO;
private final ParametersUtils parametersUtils;

@Autowired
public DoWhileTaskMapper(MetadataDAO metadataDAO, ParametersUtils parametersUtils) {
this.metadataDAO = metadataDAO;
this.parametersUtils = parametersUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.annotations.VisibleForTesting;
Expand All @@ -46,7 +45,6 @@ public class DynamicTaskMapper implements TaskMapper {
private final ParametersUtils parametersUtils;
private final MetadataDAO metadataDAO;

@Autowired
public DynamicTaskMapper(ParametersUtils parametersUtils, MetadataDAO metadataDAO) {
this.parametersUtils = parametersUtils;
this.metadataDAO = metadataDAO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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.TaskType;
Expand All @@ -35,7 +34,6 @@ public class EventTaskMapper implements TaskMapper {

private final ParametersUtils parametersUtils;

@Autowired
public EventTaskMapper(ParametersUtils parametersUtils) {
this.parametersUtils = parametersUtils;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.netflix.conductor.annotations.VisibleForTesting;
Expand Down Expand Up @@ -68,7 +67,6 @@ public class ForkJoinDynamicTaskMapper implements TaskMapper {
private static final TypeReference<List<WorkflowTask>> ListOfWorkflowTasks =
new TypeReference<>() {};

@Autowired
public ForkJoinDynamicTaskMapper(
IDGenerator idGenerator,
ParametersUtils parametersUtils,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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;
Expand All @@ -42,7 +41,6 @@ public class HTTPTaskMapper implements TaskMapper {
private final ParametersUtils parametersUtils;
private final MetadataDAO metadataDAO;

@Autowired
public HTTPTaskMapper(ParametersUtils parametersUtils, MetadataDAO metadataDAO) {
this.parametersUtils = parametersUtils;
this.metadataDAO = metadataDAO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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;
Expand All @@ -41,7 +40,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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.TaskType;
Expand All @@ -42,7 +41,6 @@ public class SwitchTaskMapper implements TaskMapper {

private final Map<String, Evaluator> evaluators;

@Autowired
public SwitchTaskMapper(Map<String, Evaluator> evaluators) {
this.evaluators = evaluators;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -53,7 +52,6 @@ public class WorkflowSweeper {

private static final String CLASS_NAME = WorkflowSweeper.class.getSimpleName();

@Autowired
public WorkflowSweeper(
WorkflowExecutor workflowExecutor,
Optional<WorkflowRepairService> workflowRepairService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.netflix.conductor.annotations.Trace;
Expand All @@ -34,7 +33,6 @@ public class ExecutionLockService {
private final long lockLeaseTime;
private final long lockTimeToTry;

@Autowired
public ExecutionLockService(ConductorProperties properties, Lock lock) {
this.properties = properties;
this.lock = lock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.apache.hc.core5.http.io.SocketConfig;
import org.apache.hc.core5.util.Timeout;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
Expand All @@ -40,7 +39,6 @@ public class DefaultRestTemplateProvider implements RestTemplateProvider {
private final int defaultReadTimeout;
private final int defaultConnectTimeout;

@Autowired
public DefaultRestTemplateProvider(
@Value("${conductor.tasks.http.readTimeout:150ms}") Duration readTimeout,
@Value("${conductor.tasks.http.connectTimeout:100ms}") Duration connectTimeout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.core.execution.WorkflowExecutor;
Expand Down Expand Up @@ -51,7 +50,6 @@ public class JsonJqTransform extends WorkflowSystemTask {
private final ObjectMapper objectMapper;
private final LoadingCache<String, JsonQuery> queryCache = createQueryCache();

@Autowired
public JsonJqTransform(ObjectMapper objectMapper) {
super(NAME);
this.objectMapper = objectMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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;

Expand Down Expand Up @@ -53,7 +52,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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;
Expand Down Expand Up @@ -66,7 +65,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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;
Expand All @@ -41,7 +40,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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;

Expand All @@ -30,7 +29,6 @@ public class RedisProperties {

private final ConductorProperties conductorProperties;

@Autowired
public RedisProperties(ConductorProperties conductorProperties) {
this.conductorProperties = conductorProperties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

Expand All @@ -48,7 +47,6 @@ public class MockExternalPayloadStorage implements ExternalPayloadStorage {
private final ObjectMapper objectMapper;
private final File payloadDir;

@Autowired
public MockExternalPayloadStorage(ObjectMapper objectMapper) throws IOException {
this.objectMapper = objectMapper;
this.payloadDir = Files.createTempDirectory("payloads").toFile();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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.core.execution.WorkflowExecutor;
Expand All @@ -44,7 +43,6 @@ public class UserTask extends WorkflowSystemTask {
private static final TypeReference<Map<String, Map<String, List<Object>>>>
mapStringListObjects = new TypeReference<>() {};

@Autowired
public UserTask(ObjectMapper objectMapper) {
super(NAME);
this.objectMapper = objectMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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;
Expand All @@ -25,7 +24,6 @@ public class ArchivingWorkflowListenerProperties {

private final Environment environment;

@Autowired
public ArchivingWorkflowListenerProperties(Environment environment) {
this.environment = environment;
}
Expand Down

0 comments on commit d7a55e7

Please sign in to comment.