code: private void validateEndpointList(List<?> list) throws IllegalArgumentException {
          if (list.isEmpty()) {
              return;
          }
  
          for (Object element : list) {
              if (element == null) {
                  throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, "null"));
              } else if (element instanceof String) {
                  String elemStr = (String) element;
                  validatePossibleEndpoint((String) element);
                  //Add endpoint to our list.  Filter duplicates.
                  if (!wlmList.contains(elemStr)) {
                      wlmList.add(elemStr);
                  }
              } else {
                  throw new IllegalArgumentException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.INVALID_ENDPOINT, element.toString()));
              }
          }
  
          //Randomize the list if we have more than 1 element.  This is our basic load balancer.
          if (wlmList.size() > 1) {
              Collections.shuffle(wlmList, new Random(System.currentTimeMillis()));
          }
  
          //We don't want anybody changing our list of endpoints from this point forward
          this.wlmList = Collections.unmodifiableList(this.wlmList);
  
      }
docs: Validates the list contains nothing but Strings, and that those Strings
  are in the endpoint format. If the List contains non-String elements,
  or a String that does not follow the endpoint host:port format,
  an IllegalArgumentException will be thrown.
  
  @param list A generic List of Objects to be validated
  @throws IllegalArgumentException if the List contains a non-String
  element or if the String is not in endpoint format