Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Removed TaskType#isSystemTask in favor SystemTaskRegistry#isSystemTask #2223

Merged
merged 1 commit into from
May 3, 2021

Conversation

aravindanr
Copy link
Collaborator

@aravindanr aravindanr commented May 3, 2021

Pull Request type

  • Refactoring (no functional changes, no api changes)

Changes in this PR

Code consolidation: The check to find if a task is a system task existed in two places. SystemTaskRegistry and TaskType. TaskType only considered hardcoded tasks as system tasks whereas SystemTaskRegistry considered any instance of WorkflowSystemTask. Replacing the TaskType#isSystemTask with SystemTaskRegistry#isSystemTask fixes the possibility that some code is only executed hardcoded system tasks and not all. In places where TaskType#isSystemTask is used as a litmus test in task type String to Enum conversion, a new method TaskType#of is used.

@apanicker-nflx apanicker-nflx added the type: maintenance Refactoring label May 3, 2021
@aravindanr aravindanr merged commit fa13e4f into main May 3, 2021
@aravindanr aravindanr deleted the tasktype_refactoring branch May 3, 2021 22:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants