Section 4.4 of the multipart/formdata RFC-7578 dictates that default media types be set in the Content-Type head field for each part:
4.4. Content-Type Header Field for Each Part Each part MAY have an (optional) "Content-Type" header field, which
defaults to "text/plain". If the contents of a file are to be sent,
the file data SHOULD be labeled with an appropriate media type, if
known, or "application/octet-stream".
RestEasyEntityPartBuilder does not set these defaults, which can result in NullPointerException if the MediaType is not set.