Generated MailboxSession id may be 0L
-------------------------------------
Key: MAILBOX-149
URL: https://issues.apache.org/jira/browse/MAILBOX-149
Project: James Mailbox
Issue Type: Bug
Components: store
Affects Versions: 0.3
Reporter: Norman Maurer
Assignee: Norman Maurer
Priority: Minor
Fix For: 0.4
Every MailboxSession has an id which is in fact a long. The Id should be unique
during until the jvm was restarted (or at least unique enough that active
mailboxsessions don't have the same id). We generate this id by using
Random.nextLong() which fullfill our needs. The only problem is that
Random.nextLong() may return 0L if we are lucky enough. This is a problem as we
use 0L as id for MailboxSessions which where create by the "system". So 0L
serve a special purpose.
So we need to make sure that 0L will never get returned for a generated
MailboxSession id.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]