Skip to content

MINOR: Remove unnecessary null check in DefaultStatePersister#stop#22308

Merged
chia7712 merged 1 commit into
apache:trunkfrom
kuoche1712003:remove-unnecessary-null-check
May 21, 2026
Merged

MINOR: Remove unnecessary null check in DefaultStatePersister#stop#22308
chia7712 merged 1 commit into
apache:trunkfrom
kuoche1712003:remove-unnecessary-null-check

Conversation

@kuoche1712003
Copy link
Copy Markdown
Contributor

@kuoche1712003 kuoche1712003 commented May 18, 2026

The stateManager field is final and assigned in both constructors of
DefaultStatePersister, so the if (stateManager != null) guard in
stop() can never evaluate to false.

No behavior change; existing tests in DefaultStatePersisterTest
remain sufficient.

Reviewers: Ken Huang s7133700@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community core Kafka Broker small Small PRs labels May 18, 2026
Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@github-actions github-actions Bot removed the triage PRs from the community label May 19, 2026
@chia7712 chia7712 merged commit 5d86a6b into apache:trunk May 21, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants