You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Patrick Moore (JIRA)" <ji...@apache.org> on 2008/06/15 07:48:45 UTC

[jira] Created: (HTTPCORE-163) AbstractMultiworkerIOReactor.execute() swallows exceptions

AbstractMultiworkerIOReactor.execute() swallows exceptions
----------------------------------------------------------

                 Key: HTTPCORE-163
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-163
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore NIO
    Affects Versions: 4.0-beta2
            Reporter: Patrick Moore


org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute() has try{}finally construct that hides the real problem.

at about line 145:

try {
    for (;;) {
        int readyCount;
         ....
   }
} catch (ClosedSelectorException ex) {
} finally {
    // Shutdown
    try {
        doShutdown();
    } catch (IOException ex) {
        throw new IOReactorException(ex.getMessage(), ex);
    }
}

should really be:

boolean success = false;
try {
    for (;;) {
        int readyCount;
         ....
   }
   success = true;
} catch (ClosedSelectorException ex) {
      success = true;
} finally {
    // Shutdown
    try {
        doShutdown();
    } catch (IOException ex) {
        if ( success)  {
           throw new IOReactorException(ex.getMessage(), ex);
        }
    }
}
      

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCORE-163) AbstractMultiworkerIOReactor.execute() swallows exceptions

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCORE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCORE-163.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0-beta2

Committed the fix. Many thanks, Patrick

Oleg

> AbstractMultiworkerIOReactor.execute() swallows exceptions
> ----------------------------------------------------------
>
>                 Key: HTTPCORE-163
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-163
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-beta2
>            Reporter: Patrick Moore
>             Fix For: 4.0-beta2
>
>
> org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute() has try{}finally construct that hides the real problem.
> at about line 145:
> try {
>     for (;;) {
>         int readyCount;
>          ....
>    }
> } catch (ClosedSelectorException ex) {
> } finally {
>     // Shutdown
>     try {
>         doShutdown();
>     } catch (IOException ex) {
>         throw new IOReactorException(ex.getMessage(), ex);
>     }
> }
> should really be:
> boolean success = false;
> try {
>     for (;;) {
>         int readyCount;
>          ....
>    }
>    success = true;
> } catch (ClosedSelectorException ex) {
>       success = true;
> } finally {
>     // Shutdown
>     try {
>         doShutdown();
>     } catch (IOException ex) {
>         if ( success)  {
>            throw new IOReactorException(ex.getMessage(), ex);
>         }
>     }
> }
>       

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org