You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kuoche1712003 (via GitHub)" <gi...@apache.org> on 2026/05/18 15:02:22 UTC

[PR] MINOR: Remove unnecessary null check in DefaultStatePersister#stop [kafka]

kuoche1712003 opened a new pull request, #22308:
URL: https://github.com/apache/kafka/pull/22308

     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. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Remove unnecessary null check in DefaultStatePersister#stop [kafka]

Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on PR #22308:
URL: https://github.com/apache/kafka/pull/22308#issuecomment-4478984570

   @kuoche1712003: Thanks for the change but it was deliberate. It would make sense with unit tests coming in a subsequent PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR: Remove unnecessary null check in DefaultStatePersister#stop [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #22308:
URL: https://github.com/apache/kafka/pull/22308


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org