Author: rdonkin
Date: Mon Jul 21 01:05:34 2008
New Revision: 678360

URL: http://svn.apache.org/viewvc?rev=678360&view=rev
Log:
Sort disposition parameters to ensure consistency across JVMs

Modified:
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
    
james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/FetchResponseEncoder.java

Modified: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test?rev=678360&r1=678359&r2=678360&view=diff
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
 (original)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchSimpleBodyStructure.test
 Mon Jul 21 01:05:34 2008
@@ -204,7 +204,7 @@
 C: A28 FETCH 1:* (BODY BODYSTRUCTURE)
 S: \* 1 FETCH \(BODY \("TEXT" "PLAIN" \("charset" "us-ascii"\) NIL NIL "7BIT" 
8 0\) BODYSTRUCTURE \("TEXT" "PLAIN" \("charset" "us-ascii"\) NIL NIL "7BIT" 8 
0 NIL NIL NIL NIL\)\)
 S: \* 2 FETCH \(BODY \("TEXT" "PLAIN" \("charset" "iso-8859-1"\) NIL NIL 
"7BIT" 192 6\) BODYSTRUCTURE \("TEXT" "PLAIN" \("charset" "iso-8859-1"\) NIL 
NIL "7BIT" 192 6 NIL \("inline" NIL\) NIL NIL\)\)
-S: \* 3 FETCH \(BODY \("APPLICATION" "XHTML\+XML" \("e" "mc\*mc"\) "<[EMAIL 
PROTECTED]>" "Homage to 70's TV" "7BIT" 183\) BODYSTRUCTURE \("APPLICATION" 
"XHTML\+XML" \("e" "mc\*mc"\) "<[EMAIL PROTECTED]>" "Homage to 70's TV" "7BIT" 
183 "Q2hlY2sgSW50ZWdyaXR5IQ==" \("inline" \("param" "value" "one" "1" "foo" 
"bar"\)\) \("en" "en-US" "en-CA"\) "http://www.example.org/rhubard.html"\)\)
+S: \* 3 FETCH \(BODY \("APPLICATION" "XHTML\+XML" \("e" "mc\*mc"\) "<[EMAIL 
PROTECTED]>" "Homage to 70's TV" "7BIT" 183\) BODYSTRUCTURE \("APPLICATION" 
"XHTML\+XML" \("e" "mc\*mc"\) "<[EMAIL PROTECTED]>" "Homage to 70's TV" "7BIT" 
183 "Q2hlY2sgSW50ZWdyaXR5IQ==" \("inline" \("foo" "bar" "one" "1" "param" 
"value"\)\) \("en" "en-US" "en-CA"\) "http://www.example.org/rhubard.html"\)\)
 S: A28 OK FETCH completed\.
 C: A29 DELETE testmailbox
 S: A29 OK DELETE completed\.

Modified: 
james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/FetchResponseEncoder.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/FetchResponseEncoder.java?rev=678360&r1=678359&r2=678360&view=diff
==============================================================================
--- 
james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/FetchResponseEncoder.java
 (original)
+++ 
james/server/trunk/imap-codec-library/src/main/java/org/apache/james/imapserver/codec/encode/imap4rev1/FetchResponseEncoder.java
 Mon Jul 21 01:05:34 2008
@@ -25,6 +25,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
 
 import javax.mail.Flags;
 
@@ -157,7 +159,8 @@
             composer.nil();
         } else {
             composer.openParen();
-            final Collection names = params.keySet();
+            final Set keySet = params.keySet();
+            final Collection names = new TreeSet(keySet);
             for (Iterator iter = names.iterator(); iter.hasNext();) {
                 final String name = (String) iter.next();
                 final String value = (String) params.get(name);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to