From c305cd43710289264a7fadd48a0e914d50cce6a3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 16 Oct 2015 15:43:12 +0100 Subject: [PATCH] WiserAssertions: convert messageBody content without using casting Signed-off-by: Paul Campbell --- src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java b/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java index 50dbf4c..c19eb40 100644 --- a/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java +++ b/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java @@ -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);