code: private static void applyValuesToList(Object value, List list) {
          if(list == null) {
              String msg = "Can not add a value to a null java.util.List";
              LOGGER.error(msg);
              throw new RuntimeException(msg);
          }
  
          if(value instanceof String[]) {
              String[] ary = (String[])value;
              for(int i = 0; i < ary.length; i++)
                  list.add(ary[i]);
          }
          else if(value instanceof String)
              list.add(value);
          // types that are not String[] or String are just set on the object
          else list.add(value);
      }
docs: Set a list of values on a {@link List}.  The behavior of this method is different given
  the type of <code>value</code>:<br/>
  - value is java.lang.String[]: add each item in the String[] to the list
  - value is a String: add the value to the list
  - otherwise, add the value to the end of the list
  @param value the value to apply to a list
  @param list the {@link List}