code: private List<?> toList(Object results)
      {
          if (results instanceof Object[])
          {
              return Arrays.asList( (Object[]) results );
          }
          if (results instanceof Collection)
          {
              return new ArrayList<Object>( (Collection<?>) results );
          }
          return null;
      }
docs: <p>toList.</p>
  
  @param results a {@link java.lang.Object} object.
  @return a {@link java.util.List} object.