james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [09/19] james-project git commit: JAMES-2214 s/validate/assert/ in MessageSender
Date Wed, 15 Nov 2017 11:15:50 GMT
JAMES-2214 s/validate/assert/ in MessageSender


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

Branch: refs/heads/master
Commit: 2b22852718246723887cbaf371cf49846a0249aa
Parents: 46e520e
Author: benwa <btellier@linagora.com>
Authored: Mon Nov 13 16:24:00 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Wed Nov 15 18:05:45 2017 +0700

----------------------------------------------------------------------
 .../main/java/org/apache/james/jmap/methods/MessageSender.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/2b228527/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MessageSender.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MessageSender.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MessageSender.java
index ab360ea..6a1a089 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MessageSender.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MessageSender.java
@@ -47,7 +47,7 @@ public class MessageSender {
     public void sendMessage(Message jmapMessage,
                             MessageFactory.MetaDataWithContent message,
                             MailboxSession session) throws MailboxException, MessagingException
{
-        validateUserIsInSenders(jmapMessage, session);
+        assertUserIsInSenders(jmapMessage, session);
         Mail mail = buildMessage(message, jmapMessage);
         try {
             MailMetadata metadata = new MailMetadata(jmapMessage.getId(), session.getUser().getUserName());
@@ -65,7 +65,7 @@ public class MessageSender {
         }
     }
 
-    private void validateUserIsInSenders(Message message, MailboxSession session) throws
MailboxSendingNotAllowedException {
+    private void assertUserIsInSenders(Message message, MailboxSession session) throws MailboxSendingNotAllowedException
{
         String allowedSender = session.getUser().getUserName();
         if (!isAllowedFromAddress(message, allowedSender)) {
             throw new MailboxSendingNotAllowedException(allowedSender);


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