void removeEmptyRows(final List list){
  for (final Iterator<ReceiptDetailInfo> detail=list.iterator(); detail.hasNext(); )   if (detail.next() == null)   detail.remove();
}

void removeEmptyRows ( final List list ) { for ( final Iterator < ReceiptDetailInfo > detail = list . iterator ( ) ; detail . hasNext ( ) ; ) if ( detail . next ( ) == null ) detail . remove ( ) ; }
removes the empty rows .
