james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1103218 - /james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java
Date Sat, 14 May 2011 20:42:45 GMT
Author: norman
Date: Sat May 14 20:42:45 2011
New Revision: 1103218

URL: http://svn.apache.org/viewvc?rev=1103218&view=rev
Log:
Better handling of namespace. Related to MAILBOX-11

Modified:
    james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java

Modified: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java?rev=1103218&r1=1103217&r2=1103218&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java (original)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxPath.java Sat May
14 20:42:45 2011
@@ -34,21 +34,21 @@ public class MailboxPath {
 
     
     public MailboxPath(String namespace, String user, String name) {
-        this.namespace = namespace;
+        if (namespace.equals("")) {
+            this.namespace = MailboxConstants.USER_NAMESPACE;
+        } else {
+            this.namespace = namespace;
+        }
         this.user = user;
         this.name = name;
     }
 
     public MailboxPath(MailboxPath mailboxPath) {
-        this.namespace = mailboxPath.getNamespace();
-        this.user = mailboxPath.getUser();
-        this.name = mailboxPath.getName();
+        this(mailboxPath.getNamespace(), mailboxPath.getUser(), mailboxPath.getName());
     }
 
     public MailboxPath(MailboxPath mailboxPath, String name) {
-        this.namespace = mailboxPath.getNamespace();
-        this.user = mailboxPath.getUser();
-        this.name = name;
+        this(mailboxPath.getNamespace(), mailboxPath.getUser(), name);
     }
 
     /**



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