public static void resetFileStates(List<FileState> fileStates){
  for (Iterator<FileState> iter=fileStates.iterator(); iter.hasNext(); ) {
    FileState fileState=iter.next();
    if (fileState.getModification() == deleted) {
      iter.remove();
    }
 else {
      fileState.setModification(null);
      fileState.setPreviousFileState(null);
    }
  }
}

public static void resetFileStates ( List < FileState > fileStates ) { for ( Iterator < FileState > iter = fileStates . iterator ( ) ; iter . hasNext ( ) ; ) { FileState fileState = iter . next ( ) ; if ( fileState . getModification ( ) == deleted ) { iter . remove ( ) ; } else { fileState . setModification ( null ) ; fileState . setPreviousFileState ( null ) ; } } }
remove modification , previousfilestate and deleted entries
