From ff48c5497927614d166a662651f9103f669b2a65 Mon Sep 17 00:00:00 2001 From: Jorge Bescos Gascon Date: Wed, 8 Sep 2021 09:02:40 +0200 Subject: [PATCH] Review fixes Signed-off-by: Jorge Bescos Gascon --- .../java/jakarta/mail/internet/MimeBodyPart.java | 2 ++ .../jakarta/mail/internet/MimeBodyPartTest.java | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/jakarta/mail/internet/MimeBodyPart.java b/api/src/main/java/jakarta/mail/internet/MimeBodyPart.java index 43f4a738..168a55f2 100644 --- a/api/src/main/java/jakarta/mail/internet/MimeBodyPart.java +++ b/api/src/main/java/jakarta/mail/internet/MimeBodyPart.java @@ -225,6 +225,8 @@ public MimeBodyPart(InternetHeaders headers, byte[] content) * @param session Session object for this message * @param is the message input stream * @exception MessagingException for failures + * + * @since JavaMail 2.0 */ public MimeBodyPart(Session session, InputStream is) throws MessagingException { this(is); diff --git a/api/src/test/java/jakarta/mail/internet/MimeBodyPartTest.java b/api/src/test/java/jakarta/mail/internet/MimeBodyPartTest.java index 8987e05b..b0917ec4 100644 --- a/api/src/test/java/jakarta/mail/internet/MimeBodyPartTest.java +++ b/api/src/test/java/jakarta/mail/internet/MimeBodyPartTest.java @@ -56,13 +56,13 @@ public void sessionProperties() throws MessagingException, IOException { assertTrue(obp.allowutf8); assertTrue(obp.cacheMultipart); // Change the properties in opposite way - prop.put("mail.mime.setdefaulttextcharset", Boolean.FALSE); - prop.put("mail.mime.setcontenttypefilename", Boolean.FALSE); - prop.put("mail.mime.encodefilename", Boolean.TRUE); - prop.put("mail.mime.decodefilename", Boolean.TRUE); - prop.put("mail.mime.ignoremultipartencoding", Boolean.FALSE); - prop.put("mail.mime.allowutf8", Boolean.FALSE); - prop.put("mail.mime.cachemultipart", Boolean.FALSE); + prop.put("mail.mime.setdefaulttextcharset", Boolean.FALSE.toString()); + prop.put("mail.mime.setcontenttypefilename", Boolean.FALSE.toString()); + prop.put("mail.mime.encodefilename", Boolean.TRUE.toString()); + prop.put("mail.mime.decodefilename", Boolean.TRUE.toString()); + prop.put("mail.mime.ignoremultipartencoding", Boolean.FALSE.toString()); + prop.put("mail.mime.allowutf8", Boolean.FALSE.toString()); + prop.put("mail.mime.cachemultipart", Boolean.FALSE.toString()); session = Session.getInstance(prop); orig = new MimeMessage(session, input);