JAMES-2186 Refactoring: Remove final qualifiers in StoreMessageIdManager

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

Branch: refs/heads/master
Commit: 88a1e49f0228ec63ea6c4421d336dc57fec99086
Parents: 1ecd297
Author: benwa <btell...@linagora.com>
Authored: Mon Oct 16 15:35:41 2017 +0700
Committer: Matthieu Baechler <matth...@apache.org>
Committed: Fri Oct 20 12:34:51 2017 +0200

----------------------------------------------------------------------
 .../mailbox/store/StoreMessageIdManager.java      | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/88a1e49f/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageIdManager.java
----------------------------------------------------------------------
diff --git 
a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageIdManager.java
 
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageIdManager.java
index b57fd1b..c118e71 100644
--- 
a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageIdManager.java
+++ 
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageIdManager.java
@@ -101,9 +101,9 @@ public class StoreMessageIdManager implements 
MessageIdManager {
     }
 
     @Override
-    public Set<MessageId> accessibleMessages(Collection<MessageId> messageIds, 
final MailboxSession mailboxSession) throws MailboxException {
+    public Set<MessageId> accessibleMessages(Collection<MessageId> messageIds, 
MailboxSession mailboxSession) throws MailboxException {
         MessageIdMapper messageIdMapper = 
mailboxSessionMapperFactory.getMessageIdMapper(mailboxSession);
-        final MailboxMapper mailboxMapper = 
mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
+        MailboxMapper mailboxMapper = 
mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
         List<MailboxMessage> messageList = messageIdMapper.find(messageIds, 
MessageMapper.FetchType.Metadata);
         return messageList.stream()
             .filter(message -> mailboxBelongsToUser(mailboxSession, 
mailboxMapper).test(message.getMailboxId()))
@@ -112,13 +112,13 @@ public class StoreMessageIdManager implements 
MessageIdManager {
     }
 
     @Override
-    public List<MessageResult> getMessages(List<MessageId> messageIds, final 
MessageResult.FetchGroup fetchGroup, final MailboxSession mailboxSession) 
throws MailboxException {
+    public List<MessageResult> getMessages(List<MessageId> messageIds, 
MessageResult.FetchGroup fetchGroup, MailboxSession mailboxSession) throws 
MailboxException {
         try {
             MessageIdMapper messageIdMapper = 
mailboxSessionMapperFactory.getMessageIdMapper(mailboxSession);
-            final MailboxMapper mailboxMapper = 
mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
+            MailboxMapper mailboxMapper = 
mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
             List<MailboxMessage> messageList = 
messageIdMapper.find(messageIds, MessageMapper.FetchType.Full);
 
-            final ImmutableSet<MailboxId> allowedMailboxIds = 
messageList.stream()
+            ImmutableSet<MailboxId> allowedMailboxIds = messageList.stream()
                 .map(MailboxMessage::getMailboxId)
                 .filter(mailboxBelongsToUser(mailboxSession, mailboxMapper))
                 .collect(Guavate.toImmutableSet());
@@ -133,7 +133,7 @@ public class StoreMessageIdManager implements 
MessageIdManager {
     }
 
     @Override
-    public void delete(MessageId messageId, final List<MailboxId> mailboxIds, 
MailboxSession mailboxSession) throws MailboxException {
+    public void delete(MessageId messageId, List<MailboxId> mailboxIds, 
MailboxSession mailboxSession) throws MailboxException {
         MessageIdMapper messageIdMapper = 
mailboxSessionMapperFactory.getMessageIdMapper(mailboxSession);
         MailboxMapper mailboxMapper = 
mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
 
@@ -259,7 +259,7 @@ public class StoreMessageIdManager implements 
MessageIdManager {
         messageIdMapper.copyInMailbox(mailboxMessage);
     }
 
-    private Function<MailboxMessage, MessageResult> 
messageResultConverter(final MessageResult.FetchGroup fetchGroup) {
+    private Function<MailboxMessage, MessageResult> 
messageResultConverter(MessageResult.FetchGroup fetchGroup) {
         return input -> {
             try {
                 return ResultUtils.loadMessageResult(input, fetchGroup);
@@ -269,11 +269,11 @@ public class StoreMessageIdManager implements 
MessageIdManager {
         };
     }
 
-    private Predicate<MailboxMessage> inMailboxes(final Collection<MailboxId> 
mailboxIds) {
+    private Predicate<MailboxMessage> inMailboxes(Collection<MailboxId> 
mailboxIds) {
         return mailboxMessage -> 
mailboxIds.contains(mailboxMessage.getMailboxId());
     }
 
-    private Predicate<MailboxId> mailboxBelongsToUser(final MailboxSession 
mailboxSession, final MailboxMapper mailboxMapper) {
+    private Predicate<MailboxId> mailboxBelongsToUser(MailboxSession 
mailboxSession, MailboxMapper mailboxMapper) {
         return mailboxId -> {
             try {
                 Mailbox currentMailbox = 
mailboxMapper.findMailboxById(mailboxId);


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

Reply via email to