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);