james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Maurer (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAILBOX-149) Generated MailboxSession id may be 0L
Date Wed, 05 Oct 2011 12:52:34 GMT
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

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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message