private void setState ( int [ ] nextState ) throws StateErrorException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setState" , new Object [ ] { nextState , new Integer ( state ) , stateNames [ state ] } ) ; synchronized ( stateLock ) { previousState = state ; // Capture the previous state for dump. state = nextState [ state ] ; // Make the state change. } // synchronized (stateLock) if ( state == stateError ) { StateErrorException stateErrorException = new StateErrorException ( this , previousState , stateNames [ previousState ] ) ; ObjectManager . ffdc . processException ( this , cclass , "setState" , stateErrorException , "1:2016:1.34" ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setState" , new Object [ ] { stateErrorException , new Integer ( state ) , stateNames [ state ] } ) ; throw stateErrorException ; } // if (state == stateError). if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "setState" , "state=" + state + "(int) " + stateNames [ state ] + "(String)" ) ; }
Makes a state transition .