From 794d37e72c0e1656c7b66546456256c4447ae2a6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 16 Oct 2015 15:43:40 +0100 Subject: [PATCH] WiserAssertions: avoid using default characterset Signed-off-by: Paul Campbell --- .../java/net/kemitix/wiser/assertions/WiserAssertions.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java b/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java index c19eb40..9ed4f29 100644 --- a/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java +++ b/src/main/java/net/kemitix/wiser/assertions/WiserAssertions.java @@ -5,7 +5,6 @@ import org.subethamail.wiser.WiserMessage; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.OutputStream; import java.text.MessageFormat; import java.util.List; import java.util.function.Predicate; @@ -268,9 +267,9 @@ public final class WiserAssertions { */ private String getMimeMultipartAsString(final MimeMultipart mimeMultipart) throws MessagingException, IOException { - OutputStream os = new ByteArrayOutputStream(); + ByteArrayOutputStream os = new ByteArrayOutputStream(); mimeMultipart.writeTo(os); - return os.toString(); + return os.toString("UTF-8"); } /**