james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [10/15] james-project git commit: MAILBOX-317 Bonus: Solve Intellij warning about unneeded cast
Date Fri, 03 Nov 2017 02:33:27 GMT
MAILBOX-317 Bonus: Solve Intellij warning about unneeded cast


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

Branch: refs/heads/master
Commit: ce3583a9dd96e3a1c1224accdbd4b5781d0d7d9f
Parents: d078c5e
Author: benwa <btellier@linagora.com>
Authored: Thu Nov 2 13:00:35 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Nov 3 09:32:32 2017 +0700

----------------------------------------------------------------------
 .../org/apache/james/mailbox/store/StoreMailboxManager.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/ce3583a9/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
index 8387ced..c13248d 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
@@ -39,7 +39,6 @@ import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MailboxSession.SessionType;
 import org.apache.james.mailbox.MailboxSessionIdGenerator;
 import org.apache.james.mailbox.MessageManager;
-import org.apache.james.mailbox.RequestAware;
 import org.apache.james.mailbox.StandardMailboxMetaDataComparator;
 import org.apache.james.mailbox.exception.BadCredentialsException;
 import org.apache.james.mailbox.exception.MailboxException;
@@ -143,9 +142,11 @@ public class StoreMailboxManager implements MailboxManager {
                                MessageId.Factory messageIdFactory, MailboxAnnotationManager
annotationManager,
                                MailboxEventDispatcher mailboxEventDispatcher,
                                DelegatingMailboxListener delegatingListener, StoreRightManager
storeRightManager) {
-        this.annotationManager = annotationManager;
         Preconditions.checkNotNull(delegatingListener);
         Preconditions.checkNotNull(mailboxEventDispatcher);
+        Preconditions.checkNotNull(mailboxSessionMapperFactory);
+
+        this.annotationManager = annotationManager;
         this.authenticator = authenticator;
         this.authorizator = authorizator;
         this.locker = locker;
@@ -732,9 +733,7 @@ public class StoreMailboxManager implements MailboxManager {
      */
     @Override
     public void endProcessingRequest(MailboxSession session) {
-        if (mailboxSessionMapperFactory instanceof RequestAware) {
-            ((RequestAware) mailboxSessionMapperFactory).endProcessingRequest(session);
-        }
+        mailboxSessionMapperFactory.endProcessingRequest(session);
     }
 
     /**


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message