CreateMailbox redoPlayer = (octxt == null ? null : (CreateMailbox) octxt.player);
CreateMailbox redoPlayer = (octxt == null ? null : (CreateMailbox) octxt.getPlayer());
    public Mailbox createMailbox(Mailbox.OperationContext octxt, Account account) throws ServiceException {        if (account == null)            throw ServiceException.FAILURE("createMailbox: must specify an account", null);        if (!Provisioning.onLocalServer(account))            throw ServiceException.WRONG_HOST(account.getAttr(Provisioning.A_zimbraMailHost), null);            Mailbox mailbox = null;            synchronized (this) {            // check to make sure the mailbox doesn't already exist            Integer mailboxKey = mMailboxIds.get(account.getId().toLowerCase());            if (mailboxKey != null)                return getMailboxById(mailboxKey.intValue());            // didn't have the mailbox in the database; need to create one now            CreateMailbox redoRecorder = new CreateMailbox(account.getId());                Connection conn = null;            MailboxData data = null;            boolean success = false;            try {                conn = DbPool.getConnection();                data = new MailboxData();                data.accountId = account.getId();                    // create the mailbox row and the mailbox database                CreateMailbox redoPlayer = (octxt == null ? null : (CreateMailbox) octxt.player);                int id = (redoPlayer == null ? Mailbox.ID_AUTO_INCREMENT : redoPlayer.getMailboxId());                NewMboxId newMboxId = DbMailbox.createMailbox(conn, id, data.accountId, account.getName());                data.id = newMboxId.id;                data.schemaGroupId = newMboxId.groupId;                DbMailbox.createMailboxDatabase(data.id, data.schemaGroupId);                // The above initialization of data is incomplete because it                // is missing the message/index volume information.  Query                // the database to get it.                DbMailbox.getMailboxVolumeInfo(conn, data);                mailbox = instantiateMailbox(data);                // the existing Connection is used for the rest of this transaction...                mailbox.beginTransaction("createMailbox", octxt, redoRecorder, conn);                // create the default folders                mailbox.initialize();                // cache the accountID-to-mailboxID and mailboxID-to-Mailbox relationships                mMailboxIds.put(data.accountId.toLowerCase(), new Integer(data.id));                mMailboxCache.put(new Integer(data.id), mailbox);                redoRecorder.setMailboxId(mailbox.getId());                success = true;            } catch (ServiceException e) {                // Log exception here, just in case.  If badness happens during rollback                // the original exception will be lost.                ZimbraLog.mailbox.error("Error during mailbox creation", e);                throw e;            } catch (Throwable t) {                ZimbraLog.mailbox.error("Error during mailbox creation", t);                throw ServiceException.FAILURE("createMailbox", t);            } finally {                try {                    if (mailbox != null) {                        mailbox.endTransaction(success);                        conn = null;                    } else {                        if (conn != null)                            conn.rollback();                    }                } finally {                    if (conn != null)                        DbPool.quietClose(conn);                }            }        }        return mailbox;    }