[
https://issues.apache.org/jira/browse/CURATOR-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815269#comment-15815269
]
Simon Cooper commented on CURATOR-375:
--------------------------------------
There's no specific test case for this, but the current behaviour of curator
violates the expectations at the bottom of
http://docs.oracle.com/javase/tutorial/essential/concurrency/interrupt.html -
thread interruption is reported either by the interrupt flag on the thread, or
throwing InterruptedException, but not both.
The current behaviour means that, even if the `InterruptedException` is
handled, the next time the thread calls `Thread.sleep` or similar, that will
immediately throw `InterruptedException` too, even if no interruption has
occurred between the two
> Fix thread interruption being reported twice
> --------------------------------------------
>
> Key: CURATOR-375
> URL: https://issues.apache.org/jira/browse/CURATOR-375
> Project: Apache Curator
> Issue Type: Bug
> Affects Versions: 2.11.1
> Reporter: Simon Cooper
> Assignee: Jordan Zimmerman
>
> When a curator operation thread is interrupted, some classes
> ({{PersistentNode}} {{ConnectionState}} primarily) report the interruption in
> two ways at the same time - by re-marking the thread interruption status
> *and* throwing {{InterruptedException}} - this makes it look like the thread
> has been interrupted twice, rather than once.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)