protected void addAttributeValuesToSamlAttribute(final String attributeName,
                                                     final Object attributeValue,
                                                     final String valueType,
                                                     final List<XMLObject> attributeList,
                                                     final QName defaultElementName) {
        val values = CollectionUtils.toCollection(attributeValue);
        if (values == null || values.isEmpty()) {
            LOGGER.trace("Skipping over SAML attribute [{}] since it has no value", attributeName);
            return;
        }
        LOGGER.trace("Attempting to generate SAML attribute [{}] with value(s) [{}]", attributeName, values);
        val collection = (Collection<?>) values;
        LOGGER.debug("Generating multi-valued SAML attribute [{}] with values [{}]", attributeName, collection);
        collection.stream().map(value -> newAttributeValue(value, valueType, defaultElementName)).forEach(attributeList::add);
    }
Add attribute values to saml attribute.

@param attributeName      the attribute name
@param attributeValue     the attribute value
@param valueType          the value type
@param attributeList      the attribute list
@param defaultElementName the default element name
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/AbstractSamlObjectBuilder.java