private synchronized void cleanSubsequentStalePages ( ) { // FIXME: Workaround until FORGE-1704 is fixed if ( flowPointer == 0 ) { flow . subList ( 1 , flow . size ( ) ) . clear ( ) ; subflow . clear ( ) ; } else { // Remove subsequent pages and push the subflows back to the stack Iterator < WizardStepEntry > it = flow . listIterator ( flowPointer + 1 ) ; int subflowIdx = 0 ; while ( it . hasNext ( ) ) { WizardStepEntry entry = it . next ( ) ; if ( entry . subflowHead && ! subflow . contains ( entry ) ) { subflow . add ( subflowIdx ++ , entry ) ; } it . remove ( ) ; } } }
Remove stale pages in case of navigational changes