Skip to content

Added message ID and received date#81

Open
rvdbdvr wants to merge 1 commit intovoodoodyne:masterfrom
rvdbdvr:master
Open

Added message ID and received date#81
rvdbdvr wants to merge 1 commit intovoodoodyne:masterfrom
rvdbdvr:master

Conversation

@rvdbdvr
Copy link

@rvdbdvr rvdbdvr commented Jan 12, 2016

To build a Java version of mailcatcher (test-tool that serves as an SMTP server, keeps all mail and provides a webinterface to browse messages received, see http://mailcatcher.me/), that can be deployed as a .war, I needed messages to have an ID (number) and a reception date. So I added those two attributes. Plus a method to retrieve a message by ID.
The mailcatcher lookalike will be in a separate project.

Added method to retrieve message by ID.
Copy link

@master-bob master-bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The potential for issues arises out of having Wiser.java setting the ID as an int value and WiserMessage.java accepting longs for IDs.

For example:
I can imagine a scenario where a user sets an ID for a WiserMessage as a non-int long, and then attempts to retrieve that ID from Wiser and would get a null.

My recommendation would be to make the ID int based throughout as that is the limitation provided by ArrayList.


/**
* Get message identifier
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded space.


/**
* Set message identifier
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants