Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Sep 8, 2021
1 parent 5387aee commit ff48c54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions api/src/main/java/jakarta/mail/internet/MimeBodyPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions api/src/test/java/jakarta/mail/internet/MimeBodyPartTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff48c54

Please sign in to comment.