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/08/09 09:35:45 UTC
[jira] [Created] (QPID-6684) Asynchronous state change exceptions
not passed back to caller
Keith Wall created QPID-6684:
--------------------------------
Summary: 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: Keith Wall
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