Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6684

Asynchronous state change exceptions not passed back to caller

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • qpid-java-6.0
    • Broker-J
    • None

    Description

      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.

       
             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);
                          }
                      }
                  }
              });
      

      Attachments

        Activity

          People

            orudyy Alex Rudyy
            kwall Keith Wall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: