private void waitForThread ( ) { if ( ( this . thread != null ) && this . thread . isAlive ( ) ) { try { this . thread . join ( ) ; } catch ( final InterruptedException e ) { e . printStackTrace ( ) ; } } }
As the result of Updater output depends on the thread s completion it is necessary to wait for the thread to finish before allowing anyone to check the result .