[
https://issues.apache.org/jira/browse/KAFKA-9415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014507#comment-17014507
]
ASF GitHub Bot commented on KAFKA-9415:
---------------------------------------
belugabehr commented on pull request #7949: KAFKA-9415: Review Thread Interrupt
Usage
URL: https://github.com/apache/kafka/pull/7949
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*
*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Review Thread Interrupt Usage
> -----------------------------
>
> Key: KAFKA-9415
> URL: https://issues.apache.org/jira/browse/KAFKA-9415
> Project: Kafka
> Issue Type: Improvement
> Reporter: David Mollitor
> Priority: Minor
>
> Noticed a few places where the code inadvertently calls
> {{Thread.interrupted()}} which returns a boolean value and clears the
> thread's interrupt flag.
>
> [https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted--]
>
> This is almost always a typo as it should be setting the flag, not clearing
> it (since it's already cleared at the point in the code where it's called).
>
> This got me looking across the code base so I added a few more.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)