title: Is a swingWorker guaranteed to throw a state property change event on completion?
body: <p>I have a class that takes in a number of <code>SwingWorkers</code> and runs them one at a time in a certain order. I use a <code>ReentrantLock</code> to make sure that only one worker runs at a time. Normally I would always unlock in a finally clause, but I need it to stay locked until the worker completes.</p>
  
  <pre><code>        nextWorker.getPropertyChangeSupport().addPropertyChangeListener("state", 
          new PropertyChangeListener()
          {
             @Override
             public void propertyChange(PropertyChangeEvent evt)
             {
                if (evt.getNewValue().equals(SwingWorker.StateValue.DONE))
                {
                   executionLock.unlock();
                }
             }
          });
  </code></pre>
  
  <p>If this is not the case, is done() guaranteed to be called? I would prefer not to call unlock this way, as it would violate encapsulation to some degree.</p>
  
  <p>Due to the nature of the project it is likely that this will come up in a code review. In that case it would be helpful to have a verifiable source. So far I have been unable to find one.</p>