Skip to content

[Improvement-16563][dolphinscheduler-task-plugin] optimize enum code#16564

Closed
LiJie20190102 wants to merge 1 commit intoapache:devfrom
LiJie20190102:optimize_enum_code
Closed

[Improvement-16563][dolphinscheduler-task-plugin] optimize enum code#16564
LiJie20190102 wants to merge 1 commit intoapache:devfrom
LiJie20190102:optimize_enum_code

Conversation

@LiJie20190102
Copy link

@LiJie20190102 LiJie20190102 commented Sep 2, 2024

Purpose of the pull request

close #16563
Loading all enumeration values during initialization instead of iterating through them at once can improve performance

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

Comment on lines -54 to -59
for (TaskTimeoutStrategy es : values()) {
if (es.getCode() == status) {
return es;
}
}
throw new IllegalArgumentException("invalid status : " + status);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is meaningless since this enum only have 3 values. Please open another more meaningful pull request. @LiJie20190102

@SbloodyS SbloodyS closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][dolphinscheduler-task-plugin] optimize enum code

2 participants