WiserAssertions: convert messageBody content without using casting
Signed-off-by: Paul Campbell <paulcampbell@fife.ac.uk>
This commit is contained in:
parent
42b77c3565
commit
c305cd4371
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ public final class WiserAssertions {
|
|||
throws IOException, MessagingException {
|
||||
Object content = getMimeMessage(message).getContent();
|
||||
if (content instanceof MimeMessage) {
|
||||
return (String) content;
|
||||
return content.toString();
|
||||
}
|
||||
if (content instanceof MimeMultipart) {
|
||||
return getMimeMultipartAsString((MimeMultipart) content);
|
||||
|
|
Loading…
Reference in a new issue