james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [2/4] james-project git commit: PROTOCOLS-117 Bonus: Remove unused MailboxPath parsing method
Date Tue, 07 Nov 2017 14:40:56 GMT
PROTOCOLS-117 Bonus: Remove unused  MailboxPath parsing method


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

Branch: refs/heads/master
Commit: 1de781643f7354c1f099b8e2d0f491a7a9f55d5d
Parents: b353752
Author: benwa <btellier@linagora.com>
Authored: Wed Nov 1 09:35:58 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Nov 7 13:45:54 2017 +0700

----------------------------------------------------------------------
 .../apache/james/mailbox/model/MailboxPath.java | 23 --------------------
 1 file changed, 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/1de78164/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxPath.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxPath.java b/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxPath.java
index 1ba8d67..92afdf2 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxPath.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/model/MailboxPath.java
@@ -43,29 +43,6 @@ public class MailboxPath {
     }
 
     /**
-     * Create a {@link MailboxPath} by parsing the given full mailboxname (which included
the namespace)
-     *
-     * @param session
-     * @param fullmailboxname
-     * @return path
-     */
-    public static MailboxPath parse(MailboxSession session, String fullmailboxname) {
-        char delimiter = session.getPathDelimiter();
-        int i = fullmailboxname.indexOf(delimiter);
-        String namespace = fullmailboxname.substring(0, i);
-        String mailbox = fullmailboxname.substring(i + 1, fullmailboxname.length());
-        String username = null;
-        if (namespace == null || namespace.trim().equals("")) {
-            namespace = MailboxConstants.USER_NAMESPACE;
-        }
-        if (namespace.equals(session.getPersonalSpace())) {
-            username = session.getUser().getUserName();
-        }
-        return new MailboxPath(namespace, username, mailbox);
-
-    }
-
-    /**
      * Create a {@link MailboxPath} in the prive namespace of the specified user
      */
     public static MailboxPath forUser(String username, String mailboxName) {


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