[
https://issues.apache.org/jira/browse/QPID-6684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935601#comment-14935601
]
Keith Wall commented on QPID-6684:
----------------------------------
Alex I think you reviewed this change already, can you confirm?
> 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: [email protected]
For additional commands, e-mail: [email protected]