In FormHttpMessageConverter:

I found the method:

protected String serializeForm(MultiValueMap<String, Object> formData, Charset charset) {
        StringBuilder builder = new StringBuilder();
        formData.forEach((name, values) -> {
                if (name == null) {
                    Assert.isTrue(CollectionUtils.isEmpty(values), () -> "Null name in form data: " + formData);
                    return;
                }
                values.forEach(value -> {
                    if (builder.length() != 0) {
                        builder.append('&');
                    }
                    builder.append(URLEncoder.encode(name, charset));
                    if (value != null) {
                        builder.append('=');
                        builder.append(URLEncoder.encode(String.valueOf(value), charset));
                    }
                });
        });

        return builder.toString();
    }

According to the spec for x-www-form-urlencoded serialization: Assert: tuple’s name and tuple’s value are scalar value strings. This assertion is not performed

Comment From: poutsma

I don't really see what we would gain by adding an assertion there, except irritate our users. Instead of following the spec to the letter, we are not producing values, which—according to the previous section in the same spec—is fine.