question: protected void removeNextProtocolMessages ( List < ProtocolMessage > protocolMessages , int fromIndex ) { for ( int i = protocolMessages . size ( ) - 1 ; i >= fromIndex ; i -- ) { protocolMessages . remove ( i ) ; } }
target:  In a case the protocol message received was not equal to the messages in our protocol message list, we have to clear our protocol message list.