private void waitForStateLoaded(){
  if (stateLoaded) {
    return;
  }
  if (stateLoader != null) {
    try {
      stateLoader.join(1000);
    }
 catch (    Exception ignored) {
    }
 finally {
      stateLoaded=true;
      stateLoader=null;
    }
  }
}

private void waitForStateLoaded ( ) { if ( stateLoaded ) { return ; } if ( stateLoader != null ) { try { stateLoader . join ( 1000 ) ; } catch ( Exception ignored ) { } finally { stateLoaded = true ; stateLoader = null ; } } }
waits for the state loading thread to finish if it is currently running .
