public static void removeEmptys(List<String> list){
  if (list != null && !list.isEmpty()) {
    Iterator<String> iterator=list.iterator();
    while (iterator.hasNext()) {
      if (StringUtils.isEmpty(iterator.next())) {
        iterator.remove();
      }
    }
  }
}

public static void removeEmptys ( List < String > list ) { if ( list != null && ! list . isEmpty ( ) ) { Iterator < String > iterator = list . iterator ( ) ; while ( iterator . hasNext ( ) ) { if ( StringUtils . isEmpty ( iterator . next ( ) ) ) { iterator . remove ( ) ; } } } }
removes empty strings from the given list . empty includes null .
