james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [13/19] james-project git commit: JAMES-2616 replace getSession() in SelectedMailboxImpl
Date Fri, 07 Dec 2018 01:10:36 GMT
JAMES-2616 replace getSession() in SelectedMailboxImpl


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

Branch: refs/heads/master
Commit: fd2005d7b2e2082d69d0062076e4e10df33686f5
Parents: 6ae22a2
Author: tran tien duc <dtran@linagora.com>
Authored: Fri Nov 30 15:15:16 2018 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri Dec 7 07:52:51 2018 +0700

----------------------------------------------------------------------
 mailbox/api/src/main/java/org/apache/james/mailbox/Event.java    | 4 ++++
 .../apache/james/imap/processor/base/SelectedMailboxImpl.java    | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/fd2005d7/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java b/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
index 5d72aa2..7282cb9 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
@@ -27,4 +27,8 @@ public interface Event {
     default User getUser() {
         return getSession().getUser().getCoreUser();
     }
+
+    default long getSessionId() {
+        return getSession().getSessionId();
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/fd2005d7/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
index d2aabf1..31a43d4 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
@@ -329,7 +329,7 @@ public class SelectedMailboxImpl implements SelectedMailbox, MailboxListener
{
     private void mailboxEvent(MailboxEvent mailboxEvent) {
         // Check if the event was for the mailbox we are observing
         if (mailboxEvent.getMailboxId().equals(getMailboxId())) {
-            final long eventSessionId = mailboxEvent.getSession().getSessionId();
+            final long eventSessionId = mailboxEvent.getSessionId();
             if (mailboxEvent instanceof MessageEvent) {
                 final MessageEvent messageEvent = (MessageEvent) mailboxEvent;
                 if (messageEvent instanceof Added) {


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