}
if (MultipartBody.class.isAssignableFrom(c)) {
return new MultipartBody(infos);
}
Multipart id = AnnotationUtils.getAnnotation(anns, Multipart.class);
Attachment multipart = AttachmentUtils.getMultipart(id, mt, infos);
if (multipart != null) {
if (collectionExpected && !mediaTypeSupported(multipart.getContentType())) {
List<Attachment> allMultiparts = AttachmentUtils.getMatchingAttachments(id, infos);
return getAttachmentCollection(t, allMultiparts, anns);
} else {
return fromAttachment(multipart, c, t, anns);
}
}
if (id != null && !id.required()) {
/*
* Return default value for a missing optional part
*/
Object defaultValue = null;
if (c.isPrimitive()) {