Skip to content

Commit

Permalink
Merge pull request #41 from ctabin/minor-refactoring
Browse files Browse the repository at this point in the history
Minor refactoring
  • Loading branch information
ctabin authored Feb 1, 2020
2 parents 5d9a736 + 76dcff6 commit ca5ab65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/ch/astorm/jotlmsg/OutlookMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
Expand Down Expand Up @@ -417,7 +418,7 @@ public MimeMessage toMimeMessage(Session session) throws IOException, MessagingE
if(plainText==null) { throw new MessagingException("missing body"); }
MimeBodyPart body = new MimeBodyPart();
body.setFileName("body");
body.setText(getPlainTextBody(), "UTF-8", "plain");
body.setText(getPlainTextBody(), StandardCharsets.UTF_8.name(), "plain");
multipart.addBodyPart(body);

for(OutlookMessageAttachment attachment : getAttachments()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/astorm/jotlmsg/io/PropertiesChunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class PropertiesChunk {
*/
public static final int FLAG_WRITEABLE = 4;

private Map<MAPIProperty, PropertyValue> properties = new HashMap<>();
private final Map<MAPIProperty, PropertyValue> properties = new HashMap<>();

/**
* Defines a property. Multi-valued properties are not yet supported.
Expand Down

0 comments on commit ca5ab65

Please sign in to comment.