james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwiederk...@apache.org
Subject svn commit: r737368 - in /james/mime4j/trunk/src: main/java/org/apache/james/mime4j/field/address/Group.java test/java/org/apache/james/mime4j/field/address/AddressTest.java
Date Sat, 24 Jan 2009 14:48:06 GMT
Author: mwiederkehr
Date: Sat Jan 24 14:48:05 2009
New Revision: 737368

URL: http://svn.apache.org/viewvc?rev=737368&view=rev
Log:
MIME4J-107: additional spaces in group string representations to allow for folding to take
place (getEncodedString) and to improve legibility (getDisplayString)

Modified:
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/address/Group.java
    james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/address/Group.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/address/Group.java?rev=737368&r1=737367&r2=737368&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/address/Group.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/address/Group.java Sat
Jan 24 14:48:05 2009
@@ -78,6 +78,7 @@
                 sb.append(',');
             }
 
+            sb.append(' ');
             sb.append(mailbox.getDisplayString(includeRoute));
         }
 
@@ -101,6 +102,7 @@
                 sb.append(',');
             }
 
+            sb.append(' ');
             sb.append(mailbox.getEncodedString());
         }
 

Modified: james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java?rev=737368&r1=737367&r2=737368&view=diff
==============================================================================
--- james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
(original)
+++ james/mime4j/trunk/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
Sat Jan 24 14:48:05 2009
@@ -358,7 +358,7 @@
         assertSame(dl, mailbox.getRoute());
         al.add(mailbox);
         Group g = new Group("group", new MailboxList(al, false));
-        assertEquals("group:test@example.com,Foo! <foo@example.com>,Foo Bar <foo2@example.com>;",
g.getDisplayString());
+        assertEquals("group: test@example.com, Foo! <foo@example.com>, Foo Bar <foo2@example.com>;",
g.getDisplayString());
     }
     
     public void testEmptyQuotedStringBeforeDotAtomInLocalPart() throws Exception {
@@ -393,9 +393,9 @@
         al.add(new Mailbox("Foo!", "foo", "example.com"));
         al.add(new Mailbox("Hans M\374ller", "hans.mueller", "acme.org"));
         Group g = new Group("group @work", new MailboxList(al, false));
-        assertEquals("\"group @work\":test@example.com,Foo! <foo@example.com>"
-                + ",=?ISO-8859-1?Q?Hans_M=FCller?= <hans.mueller@acme.org>;", g
-                .getEncodedString());
+        assertEquals("\"group @work\": test@example.com, "
+                + "Foo! <foo@example.com>, =?ISO-8859-1?Q?Hans_M=FCller?="
+                + " <hans.mueller@acme.org>;", g.getEncodedString());
     }
 
     public void testEmptyGroupGetEncodedString() throws Exception {



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