code: private String[] safeListToArray(List<String> v)
     {
        return v != null ? v.toArray(new String[v.size()]) : new String[0];
     }
docs: Convert list to array.
  
  @param v list of string
  @return array of string, empty array if list null.