This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit e2d41e3e2323d71c189b2cc67082a206caf673fa
Author: Matthieu Baechler <matth...@apache.org>
AuthorDate: Wed Nov 13 16:23:39 2019 +0100

    [Refactoring] update variable is always true
---
 .../org/apache/james/mailrepository/file/FileMailRepository.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/FileMailRepository.java
 
b/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/FileMailRepository.java
index 2472531..c818b65 100644
--- 
a/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/FileMailRepository.java
+++ 
b/server/data/data-file/src/main/java/org/apache/james/mailrepository/file/FileMailRepository.java
@@ -236,7 +236,6 @@ public class FileMailRepository implements MailRepository, 
Configurable, Initial
             keys.add(key);
         }
         boolean saveStream = true;
-        boolean update = true;
 
         MimeMessage message = mc.getMessage();
         // if the message is a Copy on Write proxy we check the wrapped message
@@ -263,15 +262,12 @@ public class FileMailRepository implements 
MailRepository, Configurable, Initial
                     // retrying to retrieve from a file we'll be overwriting.
                     saveStream = false;
                 }
-
-                // its an update
-                update = true;
             }
         }
         if (saveStream) {
             OutputStream out = null;
             try {
-                if (update && message instanceof MimeMessageWrapper) {
+                if (message instanceof MimeMessageWrapper) {
                     // we need to force the loading of the message from the
                     // stream as we want to override the old message
                     ((MimeMessageWrapper) message).loadMessage();


---------------------------------------------------------------------
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