You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2015/09/29 20:38:04 UTC

[jira] [Updated] (QPID-6684) Asynchronous state change exceptions not passed back to caller

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

Keith Wall updated QPID-6684:
-----------------------------
    Assignee: Alex Rudyy  (was: Keith Wall)

> Asynchronous state change exceptions not passed back to caller
> --------------------------------------------------------------
>
>                 Key: QPID-6684
>                 URL: https://issues.apache.org/jira/browse/QPID-6684
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Keith Wall
>            Assignee: Alex Rudyy
>             Fix For: qpid-java-6.0
>
>
> A defect in the following part of the ACO#doAttainState means that an asynchronous exception occurring in a state change method is lost and not propagated back via the future returned to the caller.
> {code:java} 
>        final SettableFuture<Void> returnVal = SettableFuture.create();
>         final ChildCounter counter = new ChildCounter(new Runnable()
>         {
>             @Override
>             public void run()
>             {
>                 try
>                 {
> ### If future returned by attainState contains an exception, it is lost.  returnVal future completes normally regardless..
>                     attainState().addListener(new Runnable()
>                     {
>                         @Override
>                         public void run()
>                         {
>                             returnVal.set(null);
>                         }
>                     }, getTaskExecutor().getExecutor());
>                 }
>                 catch(RuntimeException e)
>                 {
>                     try
>                     {
>                         exceptionHandler.handleException(e, AbstractConfiguredObject.this);
>                         returnVal.set(null);
>                     }
>                     catch(Throwable t)
>                     {
>                         returnVal.setException(t);
>                     }
>                 }
>             }
>         });
> {code} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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