JAMES-2169 Remove unneeded cast (intelliJ Warning)

setMailboxId is a Mailbox method already


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/36b4e56a
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/36b4e56a
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/36b4e56a

Branch: refs/heads/master
Commit: 36b4e56af2cd9633480f82da198ca879c2ca6e37
Parents: 2f97ab9
Author: benwa <[email protected]>
Authored: Tue Oct 3 09:36:31 2017 +0700
Committer: benwa <[email protected]>
Committed: Wed Oct 4 16:24:11 2017 +0700

----------------------------------------------------------------------
 .../apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/36b4e56a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java
----------------------------------------------------------------------
diff --git 
a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java
 
b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java
index 8c635e4..c65b66c 100644
--- 
a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java
+++ 
b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMailboxMapper.java
@@ -105,7 +105,7 @@ public class InMemoryMailboxMapper implements MailboxMapper 
{
         InMemoryId id = (InMemoryId) mailbox.getMailboxId();
         if (id == null) {
             id = InMemoryId.of(mailboxIdGenerator.incrementAndGet());
-            ((SimpleMailbox) mailbox).setMailboxId(id);
+            mailbox.setMailboxId(id);
         } else {
             try {
                 Mailbox mailboxWithPreviousName = findMailboxById(id);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to