Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PMD warning and fix a code style #16454

Merged
merged 3 commits into from
Sep 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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.
Expand Down