diff --git a/msgparser/src/main/java/com/auxilii/msgparser/Message.java b/msgparser/src/main/java/com/auxilii/msgparser/Message.java index 1dcfdff..c7dde31 100644 --- a/msgparser/src/main/java/com/auxilii/msgparser/Message.java +++ b/msgparser/src/main/java/com/auxilii/msgparser/Message.java @@ -32,7 +32,6 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.Locale; import java.util.regex.Matcher; @@ -59,7 +58,7 @@ public class Message { public static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("[EEE, ]d MMM y HH:mm[:ss] Z").toFormatter(Locale.US); /** - * The message Id. + * The message ID. */ private String messageId; /** @@ -70,7 +69,7 @@ public class Message { private String fromSMTPAddress; /** - * The name part of the From: mail address + * The name part of the "From:" mail address */ private String fromName; private String fromAddressType; @@ -121,7 +120,7 @@ public class Message { /** * Contains all properties that are not covered by the special properties. */ - private final Collection properties = new ArrayList<>(); + private final List properties = new ArrayList<>(); /** * A list containing all recipients for this message (which can be set in the * 'to:', 'cc:' and 'bcc:' field, respectively). @@ -201,6 +200,13 @@ void setProperty(Property property) { } } + /** + * The properties in the order they were added to the message. + */ + public List getProperties() { + return properties; + } + /** * Provides a short representation of this .msg object. * @@ -485,7 +491,7 @@ private static ZonedDateTime toDate(String dateValue) { try { return ZonedDateTime.from(DATE_TIME_FORMATTER.parse(dateValue)); } catch (Exception e) { - LOGGER.info("Could not parse date " + dateValue, e); + LOGGER.info("Could not parse date {}", dateValue, e); return null; } }