[JBoss JIRA] Closed: (NETTY-217) If catching InterruptedException, set back interrupt status of the thread

Trustin Lee (JIRA) jira-events at lists.jboss.org
Fri Sep 4 00:26:23 EDT 2009


     [ https://jira.jboss.org/jira/browse/NETTY-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee closed NETTY-217.
-----------------------------

    Fix Version/s: 3.1.3.GA
       Resolution: Done


I've set the interruption state where necessary.  Could you please review the changes I've made:

    http://fisheye.jboss.org/changelog/Netty/?cs=1714

and feel free to reopen the issue if I missed something.

> If catching InterruptedException, set back interrupt status of the thread
> -------------------------------------------------------------------------
>
>                 Key: NETTY-217
>                 URL: https://jira.jboss.org/jira/browse/NETTY-217
>             Project: Netty
>          Issue Type: Bug
>            Reporter: Elias Ross
>            Assignee: Trustin Lee
>             Fix For: 3.1.3.GA
>
>
> Netty contains a lot of this construct:
>             try {
>                 future = futureQueue.poll(Integer.MAX_VALUE, TimeUnit.SECONDS);
>             } catch (InterruptedException e) {
>                 // Ignore
>             }
> If interrupt occurs, reset the interrupted status and it's suggested you throw an exception as appropriate, e.g. java.io.InterruptedIOException.
> See this: http://www.ibm.com/developerworks/java/library/j-jtp05236.html 
> The following pattern should be used, generally:
> try {
> // stuff here
> } catch (InterruptedException e) {
>   Thread.currentThread().interrupt();
> }
> DefaultChannelFuture and its kind need to be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list