geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] Updated: (GERONIMO-3711) NPE if connection fails and callback is not provided
Date Mon, 17 Dec 2007 23:47:43 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-3711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sangjin Lee updated GERONIMO-3711:
----------------------------------

    Attachment: 3711.patch

a suggested patch

> NPE if connection fails and callback is not provided
> ----------------------------------------------------
>
>                 Key: GERONIMO-3711
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3711
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>    Affects Versions: 1.x
>            Reporter: Sangjin Lee
>            Priority: Minor
>         Attachments: 3711.patch
>
>
> Callbacks are now optional as it is no longer the only way to handle the result from
asynchronous requests.  In the implementation, the callbacks are now included as part of completing
the ResponseFuture.  Thus, as the operations complete, the callbacks should be invoked (if
set) inside ResponseFuture.
> If connection fails, the connect future object gets invoked, but the current connect
future (AsyncHttpClient.FutureListener) contains direct calls to AsyncHttpClientCallback.onException().
 There are two problems with this: (1) callbacks may be null, so this may result in NPE, and
(2) future will not be completed if connection fails.
> The solution is to properly set the exception on the ResponseFuture, and that will take
care of the callback invocation as well.

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


Mime
View raw message