From fe13a952cee90bb9b86183c53bf34b6f92d44957 Mon Sep 17 00:00:00 2001 From: Benoit Moriceau Date: Thu, 8 Sep 2022 10:31:53 -0700 Subject: [PATCH 1/2] Remove PMD warning and fix a code style --- .../temporal/scheduling/ConnectionManagerWorkflowImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java b/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java index 23caab44ba55..560402cf4cae 100644 --- a/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java +++ b/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java @@ -179,6 +179,7 @@ public void run(final ConnectionUpdaterInput connectionUpdaterInput) throws Retr } } + @SuppressWarnings("PMD.EmptyIfStmt") private CancellationScope generateSyncWorkflowRunnable(final ConnectionUpdaterInput connectionUpdaterInput) { return Workflow.newCancellationScope(() -> { connectionId = connectionUpdaterInput.getConnectionId(); @@ -247,7 +248,7 @@ private CancellationScope generateSyncWorkflowRunnable(final ConnectionUpdaterIn if (childWorkflowFailure.getCause() instanceof CanceledFailure) { // do nothing, cancellation handled by cancellationScope recordWorkflowFailureCountMetric(connectionUpdaterInput, FailureCause.CANCELED); - } else if (childWorkflowFailure.getCause()instanceof final ActivityFailure af) { + } else if (childWorkflowFailure.getCause() instanceof final ActivityFailure af) { // Allows us to classify unhandled failures from the sync workflow. e.g. If the normalization // activity throws an exception, for // example, this lets us set the failureOrigin to normalization. From 3f910bfa61ab30d42fae38f9f7f83def26bbff0b Mon Sep 17 00:00:00 2001 From: Benoit Moriceau Date: Thu, 8 Sep 2022 11:17:38 -0700 Subject: [PATCH 2/2] format --- .../temporal/scheduling/ConnectionManagerWorkflowImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java b/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java index 560402cf4cae..67ffdc7f27bd 100644 --- a/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java +++ b/airbyte-workers/src/main/java/io/airbyte/workers/temporal/scheduling/ConnectionManagerWorkflowImpl.java @@ -248,7 +248,7 @@ private CancellationScope generateSyncWorkflowRunnable(final ConnectionUpdaterIn if (childWorkflowFailure.getCause() instanceof CanceledFailure) { // do nothing, cancellation handled by cancellationScope recordWorkflowFailureCountMetric(connectionUpdaterInput, FailureCause.CANCELED); - } else if (childWorkflowFailure.getCause() instanceof final ActivityFailure af) { + } else if (childWorkflowFailure.getCause()instanceof final ActivityFailure af) { // Allows us to classify unhandled failures from the sync workflow. e.g. If the normalization // activity throws an exception, for // example, this lets us set the failureOrigin to normalization.