Bug 64266 - MAPIMessage.getMessageDate() mismatched documentation and behavior
Summary: MAPIMessage.getMessageDate() mismatched documentation and behavior
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HSMF (show other bugs)
Version: 4.1.2-FINAL
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2020-03-25 21:56 UTC by Marius Volkhart
Modified: 2020-03-25 21:56 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Marius Volkhart 2020-03-25 21:56:13 UTC
The Javadoc for MAPIMessage#getMessageDate() states, "Gets the date that the message was accepted by the server on.".

The implementation proceeds to look at the time that the server accepted the message, but if this is unavailable, attempts to load, in order, the date at which the client submitted the message, the last modified time, and the created time.

I believe all 3 of these last time stamps are incorrect, given that the documentation states clearly "was accepted by the server on", and there is a specific chunk for this information.

I think a case could be made for the client submitted time, but the last two should definitely not be used. Even an unsent message has these timestamps, which makes the documentation incorrect for unsent messages.

I'd like to submit a patch, but would like to hear thoughts on whether the documentation or behavior should be changed.