You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by ol...@apache.org on 2011/07/11 21:48:57 UTC

svn commit: r1145308 [7/7] - in /james/mime4j/trunk: core/src/main/java/org/apache/james/mime4j/ core/src/main/java/org/apache/james/mime4j/codec/ core/src/main/java/org/apache/james/mime4j/io/ core/src/main/java/org/apache/james/mime4j/parser/ core/sr...

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentDispositionFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentDispositionFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentDispositionFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentDispositionFieldTest.java Mon Jul 11 19:48:50 2011
@@ -37,7 +37,7 @@ public class ContentDispositionFieldTest
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentDispositionFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testDispositionTypeWithSemiColonNoParams() throws Exception {
         ContentDispositionField f = parse("Content-Disposition: inline;");
         assertEquals("inline", f.getDispositionType());

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLanguageFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLanguageFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLanguageFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLanguageFieldTest.java Mon Jul 11 19:48:50 2011
@@ -37,7 +37,7 @@ public class ContentLanguageFieldTest ex
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentLanguageFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testGetLanguage() throws Exception {
         ContentLanguageField f = parse("Content-Language: en, de");
         List<String> langs = f.getLanguages();
@@ -46,7 +46,7 @@ public class ContentLanguageFieldTest ex
         assertEquals("en", langs.get(0));
         assertEquals("de", langs.get(1));
     }
-    
+
     public void testGetLanguageWithComments() throws Exception {
         ContentLanguageField f = parse("Content-Language: en (yada yada), (blah blah)de");
         List<String> langs = f.getLanguages();
@@ -55,7 +55,7 @@ public class ContentLanguageFieldTest ex
         assertEquals("en", langs.get(0));
         assertEquals("de", langs.get(1));
     }
-    
+
     public void testGetLanguageWithUnderscore() throws Exception {
         ContentLanguageField f = parse("Content-Language: en, en_GB (Great Britain)");
         List<String> langs = f.getLanguages();
@@ -63,7 +63,7 @@ public class ContentLanguageFieldTest ex
         assertEquals(0, langs.size());
         assertNotNull(f.getParseException());
     }
-    
+
     public void testGetLanguageWithEmptyElement() throws Exception {
         ContentLanguageField f = parse("Content-Language: en,, de");
         List<String> langs = f.getLanguages();
@@ -71,5 +71,5 @@ public class ContentLanguageFieldTest ex
         assertEquals(0, langs.size());
         assertNotNull(f.getParseException());
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLocationFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLocationFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLocationFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentLocationFieldTest.java Mon Jul 11 19:48:50 2011
@@ -35,29 +35,29 @@ public class ContentLocationFieldTest ex
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentLocationFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testGetSimpleLocation() throws Exception {
         ContentLocationField f = parse("Content-Location: stuff");
         String location = f.getLocation();
         assertEquals("stuff", location);
     }
-    
+
     public void testGetQuotedLocation() throws Exception {
         ContentLocationField f = parse("Content-Location: \" stuff \"");
         String location = f.getLocation();
         assertEquals("stuff", location);
     }
-    
+
     public void testGetLocationWithBlanks() throws Exception {
         ContentLocationField f = parse("Content-Location: this / that \t/what not");
         String location = f.getLocation();
         assertEquals("this/that/whatnot", location);
     }
-    
+
     public void testGetLocationWithCommens() throws Exception {
         ContentLocationField f = parse("Content-Location: this(blah) / that (yada) /what not");
         String location = f.getLocation();
         assertEquals("this/that/whatnot", location);
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTransferEncodingFieldTest.java Mon Jul 11 19:48:50 2011
@@ -36,31 +36,31 @@ public class ContentTransferEncodingFiel
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentTransferEncodingFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testGetEncoding() throws Exception {
         ContentTransferEncodingField f = parse("Content-Transfer-Encoding: 8bit");
         assertEquals("8bit", f.getEncoding());
-        
+
         f = parse("Content-Transfer-Encoding:    BaSE64   ");
         assertEquals("base64", f.getEncoding());
-        
+
         f = parse("Content-Transfer-Encoding:       ");
         assertEquals("", f.getEncoding());
-        
+
         f = parse("Content-Transfer-Encoding:");
         assertEquals("", f.getEncoding());
     }
-    
+
     public void testGetEncodingStatic() throws Exception {
         ContentTransferEncodingField f = parse("Content-Transfer-Encoding: 8bit");
         assertEquals("8bit", ContentTransferEncodingFieldImpl.getEncoding(f));
-        
+
         f = null;
         assertEquals("7bit", ContentTransferEncodingFieldImpl.getEncoding(f));
-        
+
         f = parse("Content-Transfer-Encoding:       ");
         assertEquals("7bit", ContentTransferEncodingFieldImpl.getEncoding(f));
-        
+
         f = parse("Content-Transfer-Encoding:");
         assertEquals("7bit", ContentTransferEncodingFieldImpl.getEncoding(f));
     }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTypeFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTypeFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTypeFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/ContentTypeFieldTest.java Mon Jul 11 19:48:50 2011
@@ -36,65 +36,65 @@ public class ContentTypeFieldTest extend
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentTypeFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testMimeTypeWithSemiColonNoParams() throws Exception  {
         ContentTypeField f = parse("Content-Type: text/html;");
         assertEquals("text/html", f.getMimeType());
     }
-    
+
     public void testGetMimeType() throws Exception {
         ContentTypeField f = parse("Content-Type: text/PLAIN");
         assertEquals("text/plain", f.getMimeType());
-        
+
         f = parse("content-type:   TeXt / html   ");
         assertEquals("text/html", f.getMimeType());
-        
+
         f = parse("CONTENT-TYPE:   x-app/yada ;"
                                                     + "  param = yada");
         assertEquals("x-app/yada", f.getMimeType());
-        
+
         f = parse("CONTENT-TYPE:   yada");
         assertEquals(null, f.getMimeType());
     }
-    
+
     public void testGetMimeTypeStatic() throws Exception {
         ContentTypeField child = parse("Content-Type: child/type");;
         ContentTypeField parent = parse("Content-Type: parent/type");
-        
+
         assertEquals("child/type", ContentTypeFieldImpl.getMimeType(child, parent));
-        
+
         child = null;
         parent = parse("Content-Type: parent/type");
         assertEquals("text/plain", ContentTypeFieldImpl.getMimeType(child, parent));
         parent = parse("Content-Type: multipart/digest");
         assertEquals("message/rfc822", ContentTypeFieldImpl.getMimeType(child, parent));
-        
+
         child = parse("Content-Type:");
         parent = parse("Content-Type: parent/type");
         assertEquals("text/plain", ContentTypeFieldImpl.getMimeType(child, parent));
         parent = parse("Content-Type: multipart/digest");
         assertEquals("message/rfc822", ContentTypeFieldImpl.getMimeType(child, parent));
     }
-    
+
     public void testGetCharsetStatic() throws Exception {
         ContentTypeField f = parse("Content-Type: some/type; charset=iso8859-1");
         assertEquals("iso8859-1", ContentTypeFieldImpl.getCharset(f));
-        
+
         f = parse("Content-Type: some/type;");
         assertEquals("us-ascii", ContentTypeFieldImpl.getCharset(f));
     }
-    
+
     public void testGetParameter() throws Exception {
         ContentTypeField f = parse("CONTENT-TYPE:   text / html ;"
                                                 + "  boundary=yada yada");
         assertEquals("yada", f.getParameter("boundary"));
-        
+
         f = parse("Content-Type: x-app/yada;"
                                                 + "  boUNdarY= \"ya:\\\"*da\"; "
                                                 + "\tcharset\t =  us-ascii");
         assertEquals("ya:\"*da", f.getParameter("boundary"));
         assertEquals("us-ascii", f.getParameter("charset"));
-        
+
         f = parse("Content-Type: x-app/yada;  "
                             + "boUNdarY= \"ya \\\"\\\"\tda \\\"\"; "
                             + "\tcharset\t =  \"\\\"hepp\\\"  =us\t-ascii\"");

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentDispositionFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentDispositionFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentDispositionFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentDispositionFieldTest.java Mon Jul 11 19:48:50 2011
@@ -37,7 +37,7 @@ public class LenientContentDispositionFi
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentDispositionFieldLenientImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testDispositionTypeWithSemiColonNoParams() throws Exception {
         ContentDispositionField f = parse("Content-Disposition: inline;");
         assertEquals("inline", f.getDispositionType());

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLanguageFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLanguageFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLanguageFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLanguageFieldTest.java Mon Jul 11 19:48:50 2011
@@ -37,7 +37,7 @@ public class LenientContentLanguageField
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentLanguageFieldLenientImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testGetLanguage() throws Exception {
         ContentLanguageField f = parse("Content-Language: en, de");
         List<String> langs = f.getLanguages();
@@ -46,14 +46,14 @@ public class LenientContentLanguageField
         assertEquals("en", langs.get(0));
         assertEquals("de", langs.get(1));
     }
-    
+
     public void testGetLanguageEmpty() throws Exception {
         ContentLanguageField f = parse("Content-Language: ");
         List<String> langs = f.getLanguages();
         assertNotNull(langs);
         assertEquals(0, langs.size());
     }
-    
+
     public void testGetLanguageWithComments() throws Exception {
         ContentLanguageField f = parse("Content-Language: en (yada yada), (blah blah)de");
         List<String> langs = f.getLanguages();
@@ -62,7 +62,7 @@ public class LenientContentLanguageField
         assertEquals("en", langs.get(0));
         assertEquals("de", langs.get(1));
     }
-    
+
     public void testGetLanguageWithUnderscore() throws Exception {
         ContentLanguageField f = parse("Content-Language: en, en_GB (Great Britain)");
         List<String> langs = f.getLanguages();
@@ -71,7 +71,7 @@ public class LenientContentLanguageField
         assertEquals("en", langs.get(0));
         assertEquals("en_GB", langs.get(1));
     }
-    
+
     public void testGetLanguageWithEmptyElement() throws Exception {
         ContentLanguageField f = parse("Content-Language: en,, de,");
         List<String> langs = f.getLanguages();
@@ -80,5 +80,5 @@ public class LenientContentLanguageField
         assertEquals("en", langs.get(0));
         assertEquals("de", langs.get(1));
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLocationFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLocationFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLocationFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentLocationFieldTest.java Mon Jul 11 19:48:50 2011
@@ -35,29 +35,29 @@ public class LenientContentLocationField
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentLocationFieldLenientImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testGetSimpleLocation() throws Exception {
         ContentLocationField f = parse("Content-Location: stuff");
         String location = f.getLocation();
         assertEquals("stuff", location);
     }
-    
+
     public void testGetQuotedLocation() throws Exception {
         ContentLocationField f = parse("Content-Location: \" stuff \"");
         String location = f.getLocation();
         assertEquals("stuff", location);
     }
-    
+
     public void testGetLocationWithBlanks() throws Exception {
         ContentLocationField f = parse("Content-Location: this / that \t/what not");
         String location = f.getLocation();
         assertEquals("this/that/whatnot", location);
     }
-    
+
     public void testGetLocationWithCommens() throws Exception {
         ContentLocationField f = parse("Content-Location: this(blah) / that (yada) /what not");
         String location = f.getLocation();
         assertEquals("this/that/whatnot", location);
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentTypeFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentTypeFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentTypeFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientContentTypeFieldTest.java Mon Jul 11 19:48:50 2011
@@ -35,51 +35,51 @@ public class LenientContentTypeFieldTest
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return ContentTypeFieldLenientImpl.PARSER.parse(rawField, null);
     }
-    
+
     public void testMimeTypeWithSemiColonNoParams() throws Exception  {
         ContentTypeField f = parse("Content-Type: text/html;");
         assertEquals("text/html", f.getMimeType());
     }
-    
+
     public void testMimeTypeWithMultipleSemiColon() throws Exception  {
         ContentTypeField f = parse("Content-Type: text/html;;;");
         assertEquals("text/html", f.getMimeType());
         assertEquals(1, f.getParameters().size());
     }
-    
+
     public void testMimeTypeWithNonameParam() throws Exception  {
         ContentTypeField f = parse("Content-Type: text/html;=stuff");
         assertEquals("text/html", f.getMimeType());
         assertEquals(1, f.getParameters().size());
         assertEquals("stuff", f.getParameter(""));
     }
-    
+
     public void testGetMimeType() throws Exception {
         ContentTypeField f = parse("Content-Type: text/PLAIN");
         assertEquals("text/plain", f.getMimeType());
-        
+
         f = parse("content-type:   TeXt / html   ");
         assertEquals("text/html", f.getMimeType());
-        
+
         f = parse("CONTENT-TYPE:   x-app/yada ;"
                                                     + "  param = yada");
         assertEquals("x-app/yada", f.getMimeType());
-        
+
         f = parse("CONTENT-TYPE:   yada");
         assertEquals(null, f.getMimeType());
     }
-    
+
     public void testGetParameter() throws Exception {
         ContentTypeField f = parse("CONTENT-TYPE:   text / html ;"
                                                 + "  boundary=yada yada");
         assertEquals("yada yada", f.getParameter("boundary"));
-        
+
         f = parse("Content-Type: x-app/yada;"
                                                 + "  boUNdarY= \"ya:\\\"*da\"; "
                                                 + "\tcharset\t =  us-ascii");
         assertEquals("ya:\"*da", f.getParameter("boundary"));
         assertEquals("us-ascii", f.getParameter("charset"));
-        
+
         f = parse("Content-Type: x-app/yada;  "
                             + "boUNdarY= \"ya \\\"\\\"\tda \\\"\"; "
                             + "\tcharset\t =  \"\\\"hepp\\\"  =us\t-ascii\"");

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientMimeVersionParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientMimeVersionParserTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientMimeVersionParserTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/LenientMimeVersionParserTest.java Mon Jul 11 19:48:50 2011
@@ -35,7 +35,7 @@ public class LenientMimeVersionParserTes
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return MimeVersionFieldLenientImpl.PARSER.parse(rawField, null);
     }
-    
+
     static void check(String input, int expectedMajorVersion, int expectedMinorVersion) throws Exception {
         MimeVersionField f = parse("MIME-Version: " + input);
         assertEquals("Major version number", expectedMajorVersion, f.getMajorVersion());
@@ -48,7 +48,7 @@ public class LenientMimeVersionParserTes
         check("0.1", 0, 1);
         check("123234234.0", 123234234, 0);
     }
-    
+
     public void testLineWithComments() throws Exception {
         check("2(A comment).4", 2, 4);
         check("2(.8).4", 2, 4);
@@ -56,37 +56,37 @@ public class LenientMimeVersionParserTes
         check("2.4(A comment)", 2, 4);
         check("2.(A comment)4", 2, 4);
     }
-    
+
     public void testLineWithNestedComments() throws Exception {
         check("2(4.45 ( Another ()comment () blah (Wobble(mix)))Whatever).4", 2, 4);
     }
-    
+
     public void testMalformed1() throws Exception {
         MimeVersionField f = parse("MIME-Version: 5  ");
         assertEquals(5, f.getMajorVersion());
         assertEquals(MimeVersionFieldImpl.DEFAULT_MINOR_VERSION, f.getMinorVersion());
         assertNull(f.getParseException());
     }
-    
+
     public void testMalformed2() throws Exception {
         MimeVersionField f = parse("MIME-Version: 5.  ");
         assertEquals(5, f.getMajorVersion());
         assertEquals(MimeVersionFieldImpl.DEFAULT_MINOR_VERSION, f.getMinorVersion());
         assertNull(f.getParseException());
     }
-    
+
     public void testMalformed3() throws Exception {
         MimeVersionField f = parse("MIME-Version: .5  ");
         assertEquals(MimeVersionFieldImpl.DEFAULT_MAJOR_VERSION, f.getMajorVersion());
         assertEquals(5, f.getMinorVersion());
         assertNull(f.getParseException());
     }
-    
+
     public void testMalformed4() throws Exception {
         MimeVersionField f = parse("MIME-Version: crap ");
         assertEquals(MimeVersionFieldImpl.DEFAULT_MAJOR_VERSION, f.getMajorVersion());
         assertEquals(MimeVersionFieldImpl.DEFAULT_MINOR_VERSION, f.getMinorVersion());
         assertNull(f.getParseException());
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/MimeVersionParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/MimeVersionParserTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/MimeVersionParserTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/MimeVersionParserTest.java Mon Jul 11 19:48:50 2011
@@ -35,7 +35,7 @@ public class MimeVersionParserTest exten
         RawField rawField = RawFieldParser.DEFAULT.parseField(raw);
         return MimeVersionFieldImpl.PARSER.parse(rawField, null);
     }
-    
+
     static void check(String input, int expectedMajorVersion, int expectedMinorVersion) throws Exception {
         MimeVersionField f = parse("MIME-Version: " + input);
         assertEquals("Major version number", expectedMajorVersion, f.getMajorVersion());
@@ -48,7 +48,7 @@ public class MimeVersionParserTest exten
         check("0.1", 0, 1);
         check("123234234.0", 123234234, 0);
     }
-    
+
     public void testLineWithComments() throws Exception {
         check("2(A comment).4", 2, 4);
         check("2(.8).4", 2, 4);
@@ -56,16 +56,16 @@ public class MimeVersionParserTest exten
         check("2.4(A comment)", 2, 4);
         check("2.(A comment)4", 2, 4);
     }
-    
+
     public void testLineWithNestedComments() throws Exception {
         check("2(4.45 ( Another ()comment () blah (Wobble(mix)))Whatever).4", 2, 4);
     }
-    
+
     public void testEmptyLine() throws Exception {
         MimeVersionField f = parse("MIME-Version: (This is just a comment)");
         assertEquals(MimeVersionFieldImpl.DEFAULT_MAJOR_VERSION, f.getMajorVersion());
         assertEquals(MimeVersionFieldImpl.DEFAULT_MINOR_VERSION, f.getMinorVersion());
         assertNotNull(f.getParseException());
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/UnstructuredFieldTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/UnstructuredFieldTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/UnstructuredFieldTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/UnstructuredFieldTest.java Mon Jul 11 19:48:50 2011
@@ -28,13 +28,13 @@ public class UnstructuredFieldTest exten
 
     public void testGetBody() throws Exception {
         UnstructuredField f = null;
-        
+
         f = (UnstructuredField) DefaultFieldParser.parse("Subject: Yada\r\n yada yada\r\n");
         assertEquals("Testing folding value 1", "Yada yada yada", f.getValue());
-        
+
         f = (UnstructuredField) DefaultFieldParser.parse("Subject:  \r\n\tyada");
         assertEquals("Testing folding value 2", " \tyada", f.getValue());
-        
+
         f = (UnstructuredField) DefaultFieldParser.parse("Subject:yada");
         assertEquals("Testing value without a leading ' '", "yada", f.getValue());
     }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/address/AddressTest.java Mon Jul 11 19:48:50 2011
@@ -41,13 +41,13 @@ public class AddressTest extends TestCas
     public void testNullConstructorAndBadUsage() {
         AddressList al = new AddressList(null, false);
         assertEquals(0, al.size());
-        
+
         try {
             al.get(-1);
             fail("Expected index out of bound exception!");
         } catch (IndexOutOfBoundsException e) {
         }
-        
+
         try {
             al.get(0);
             fail("Expected index out of bound exception!");
@@ -55,24 +55,24 @@ public class AddressTest extends TestCas
         }
     }
 
-    
+
     public void testEmptyDomainList() {
         DomainList dl = new DomainList(null, false);
         assertEquals(0, dl.size());
-        
+
         try {
             dl.get(-1);
             fail("Expected index out of bound exception!");
         } catch (IndexOutOfBoundsException e) {
         }
-        
+
         try {
             dl.get(0);
             fail("Expected index out of bound exception!");
         } catch (IndexOutOfBoundsException e) {
         }
     }
-    
+
     public void testDomainList() {
         List<String> al = new ArrayList<String>();
         al.add("example.com");
@@ -82,28 +82,28 @@ public class AddressTest extends TestCas
         assertEquals(1, dl.size());
         al.add("foo.example.com");
         assertEquals(2, dl.size());
-        
+
         // cloned arraylist
         DomainList dlcopy = new DomainList(al, false);
         assertEquals(2, dlcopy.size());
         al.add("bar.example.com");
         assertEquals(2, dlcopy.size());
-        
+
         // check route string
         assertEquals("@example.com,@foo.example.com", dlcopy.toRouteString());
     }
-    
+
 
     public void testEmptyMailboxList() {
         MailboxList ml = new MailboxList(null, false);
         assertEquals(0, ml.size());
-        
+
         try {
             ml.get(-1);
             fail("Expected index out of bound exception!");
         } catch (IndexOutOfBoundsException e) {
         }
-        
+
         try {
             ml.get(0);
             fail("Expected index out of bound exception!");
@@ -120,14 +120,14 @@ public class AddressTest extends TestCas
         assertEquals(1, ml.size());
         al.add(new Mailbox("local2", "foo.example.com"));
         assertEquals(2, ml.size());
-        
+
         // cloned arraylist
         MailboxList mlcopy = new MailboxList(al, false);
         assertEquals(2, mlcopy.size());
         al.add(new Mailbox("local3", "bar.example.com"));
         assertEquals(2, mlcopy.size());
     }
-    
+
     public void testMailboxEquals() throws Exception {
         Mailbox m1 = new Mailbox("john.doe", "acme.org");
         Mailbox m2 = new Mailbox("john doe", "acme.org");
@@ -139,7 +139,7 @@ public class AddressTest extends TestCas
         assertFalse(m1.equals(m4));
         assertFalse(m1.equals(null));
     }
-    
+
     public void testMailboxHashCode() throws Exception {
         Mailbox m1 = new Mailbox("john.doe", "acme.org");
         Mailbox m2 = new Mailbox("john doe", "acme.org");

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/contentdisposition/ContentDispositionTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/contentdisposition/ContentDispositionTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/contentdisposition/ContentDispositionTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/contentdisposition/ContentDispositionTest.java Mon Jul 11 19:48:50 2011
@@ -30,5 +30,5 @@ public class ContentDispositionTest exte
         // make sure that our ParseException extends MimeException.
         assertTrue(MimeException.class.isAssignableFrom(ParseException.class));
     }
-    
+
 }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/datetime/DateTimeTest.java Mon Jul 11 19:48:50 2011
@@ -28,7 +28,7 @@ import org.apache.james.mime4j.field.dat
 import java.io.StringReader;
 
 public class DateTimeTest extends TestCase {
-    
+
     public void testExceptionTree() {
         // make sure that our ParseException extends MimeException.
         assertTrue(MimeException.class.isAssignableFrom(ParseException.class));

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/mimeversion/MimeVersionParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/mimeversion/MimeVersionParserTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/mimeversion/MimeVersionParserTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/mimeversion/MimeVersionParserTest.java Mon Jul 11 19:48:50 2011
@@ -44,7 +44,7 @@ public class MimeVersionParserTest exten
         check("0.1", 0, 1);
         check("123234234.0", 123234234, 0);
     }
-    
+
     public void testLineWithComments() throws Exception {
         check("2(A comment).4", 2, 4);
         check("2(.8).4", 2, 4);
@@ -52,11 +52,11 @@ public class MimeVersionParserTest exten
         check("2.4(A comment)", 2, 4);
         check("2.(A comment)4", 2, 4);
     }
-    
+
     public void testLineWithNestedComments() throws Exception {
         check("2(4.45 ( Another ()comment () blah (Wobble(mix)))Whatever).4", 2, 4);
     }
-    
+
     public void testEmptyLine() throws Exception {
         try {
             parse("(This is just a comment)");
@@ -65,7 +65,7 @@ public class MimeVersionParserTest exten
             //expected
         }
     }
-    
+
     private void check(String input, int expectedMajorVersion, int expectedMinorVersion) throws Exception {
         MimeVersionParser parser = parse(input);
         assertEquals("Major version number", expectedMajorVersion, parser.getMajorVersion());

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/structured/StructuredFieldParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/structured/StructuredFieldParserTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/structured/StructuredFieldParserTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/field/structured/StructuredFieldParserTest.java Mon Jul 11 19:48:50 2011
@@ -41,32 +41,32 @@ public class StructuredFieldParserTest e
         final String string = "Field Value";
         assertEquals(string, parse(string));
     }
-    
+
     public void testTrim() throws Exception {
         final String string = "Field Value";
         assertEquals(string, parse("    \t\r\n" + string + "  \t\r\n  "));
     }
-    
+
     public void testFolding() throws Exception {
         assertEquals("Field Value", parse("Field \t\r\n  Value"));
     }
-    
+
     public void testQuotedString() throws Exception {
         assertEquals("Field    Value", parse("\"Field    Value\""));
         assertEquals("Field\t\r\nValue", parse("\"Field\t\r\nValue\""));
         assertEquals("Field\t\r\nValue", parse("\"Field\t\r\n       \t       Value\""));
     }
-    
+
     public void testComments() throws Exception {
         assertEquals("Field", parse("Fi(This is a comment)eld"));
         assertEquals("Field Value", parse("Fi(This is a comment)eld (A (very (nested) )comment)Value"));
     }
-    
+
     public void testQuotedInComments() throws Exception {
         assertEquals("Fi(This is a comment)eld", parse("\"Fi(This is a comment)eld\""));
         assertEquals("Field Value", parse("Fi(This is a comment)eld (A (very (nested) )comment)Value"));
     }
-    
+
     private String parse(String in) throws Exception {
         StructuredFieldParser parser = new StructuredFieldParser(new StringReader(in));
         parser.setFoldingPreserved(true);

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java (original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java Mon Jul 11 19:48:50 2011
@@ -36,7 +36,7 @@ import org.apache.james.mime4j.stream.Ra
 public class MaximalBodyDescriptorTest extends TestCase {
 
     MimeTokenStream parser;
-    
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -49,7 +49,7 @@ public class MaximalBodyDescriptorTest e
         /*
          * Make sure that only the first Content-Type header added is used.
          */
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         builder.addField(new RawField("Content-Type ", "text/plain; charset=ISO-8859-1"));
         BodyDescriptor bd = builder.build();
         assertEquals("text/plain", bd.getMimeType());
@@ -59,28 +59,28 @@ public class MaximalBodyDescriptorTest e
         assertEquals("text/plain", bd.getMimeType());
         assertEquals("ISO-8859-1", bd.getCharset());
     }
-    
+
     public void testGetMimeType() throws Exception {
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         builder.addField(new RawField("Content-Type ", "text/PLAIN"));
         BodyDescriptor bd = builder.build();
         assertEquals("text/plain", bd.getMimeType());
-        
+
         builder.reset();
         builder.addField(new RawField("content-type", "   TeXt / html   "));
         bd = builder.build();
         assertEquals("text/html", bd.getMimeType());
-        
+
         builder.reset();
         builder.addField(new RawField("CONTENT-TYPE", "   x-app/yada ;  param = yada"));
         bd = builder.build();
         assertEquals("x-app/yada", bd.getMimeType());
-        
+
         builder.reset();
         builder.addField(new RawField("CONTENT-TYPE", "   yada"));
         bd = builder.build();
         assertEquals("text/plain", bd.getMimeType());
-        
+
         /*
          * Make sure that only the first Content-Type header added is used.
          */
@@ -91,7 +91,7 @@ public class MaximalBodyDescriptorTest e
         builder.addField(new RawField("Content-Type ", "text/html"));
         bd = builder.build();
         assertEquals("text/plain", bd.getMimeType());
-        
+
         /*
          * Implicit mime types.
          */
@@ -103,21 +103,21 @@ public class MaximalBodyDescriptorTest e
         child.addField(new RawField("Content-Type", " child/type"));
         bd = child.build();
         assertEquals("child/type", bd.getMimeType());
-        
+
         parent.reset();
         parent.addField(new RawField("Content-Type", "multipart/digest; boundary=foo"));
-        
+
         child = parent.newChild();
         bd = child.build();
         assertEquals("message/rfc822", bd.getMimeType());
         child.addField(new RawField("Content-Type", " child/type"));
         bd = child.build();
         assertEquals("child/type", bd.getMimeType());
-        
+
     }
-    
+
     public void testParameters() throws Exception {
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         /*
          * Test charset.
          */
@@ -126,14 +126,14 @@ public class MaximalBodyDescriptorTest e
         builder.addField(new RawField("Content-Type ", "text/type; charset=ISO-8859-1"));
         bd = builder.build();
         assertEquals("ISO-8859-1", bd.getCharset());
-        
+
         builder.reset();
         bd = builder.build();
         assertEquals("us-ascii", bd.getCharset());
         builder.addField(new RawField("Content-Type ", "text/type"));
         bd = builder.build();
         assertEquals("us-ascii", bd.getCharset());
-        
+
         /*
          * Test boundary.
          */
@@ -153,11 +153,11 @@ public class MaximalBodyDescriptorTest e
         bd = builder.build();
         assertEquals("ya \"\"\tda \"", bd.getBoundary());
         assertEquals("\"hepp\"  =us\t-ascii", bd.getCharset());
-        
+
     }
-    
+
     public void testGetContentLength() throws Exception {
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         BodyDescriptor bd = builder.build();
         assertEquals(-1, bd.getContentLength());
 
@@ -170,16 +170,16 @@ public class MaximalBodyDescriptorTest e
         bd = builder.build();
         assertEquals(9901, bd.getContentLength());
     }
-    
+
     public void testDoDefaultToUsAsciiWhenUntyped() throws Exception {
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         builder.addField(new RawField("To", "me@example.org"));
         BodyDescriptor bd = builder.build();
         assertEquals("us-ascii", bd.getCharset());
     }
 
     public void testDoNotDefaultToUsAsciiForNonTextTypes() throws Exception {
-        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder(); 
+        BodyDescriptorBuilder builder = new DefaultBodyDescriptorBuilder();
         builder.addField(new RawField("Content-Type", "image/png; name=blob.png"));
         BodyDescriptor bd = builder.build();
         assertNull(bd.getCharset());
@@ -190,13 +190,13 @@ public class MaximalBodyDescriptorTest e
         assertEquals(1, descriptor.getMimeMajorVersion());
         assertEquals(0, descriptor.getMimeMinorVersion());
     }
-    
+
     public void testMimeVersion() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_ASCII_COMMENT_IN_MIME_VERSION_BYTES);
         assertEquals(2, descriptor.getMimeMajorVersion());
         assertEquals(4, descriptor.getMimeMinorVersion());
     }
-    
+
     public void testContentId() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_8859_BYTES);
         assertEquals(1, descriptor.getMimeMajorVersion());
@@ -210,25 +210,25 @@ public class MaximalBodyDescriptorTest e
         assertEquals(0, descriptor.getMimeMinorVersion());
         assertEquals(ExampleMail.CONTENT_DESCRIPTION, descriptor.getContentDescription());
     }
-    
+
     public void testMimeVersionHeaderBreak() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_ASCII_MIME_VERSION_SPANS_TWO_LINES_BYTES);
         assertEquals(4, descriptor.getMimeMajorVersion());
         assertEquals(1, descriptor.getMimeMinorVersion());
     }
-    
+
     public void testContentDispositionType() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_BASE64_LATIN1_BYTES);
         assertEquals("inline", descriptor.getContentDispositionType());
     }
-    
+
     public void testContentDispositionTypeCaseConversion() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_BASE64_LATIN1_BYTES);
         assertEquals("Should be converted to lower case", "inline", descriptor.getContentDispositionType());
         assertNotNull(descriptor.getContentDispositionParameters());
         assertEquals(0, descriptor.getContentDispositionParameters().size());
     }
-    
+
     public void testContentDispositionParameters() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_WITH_CONTENT_DISPOSITION_PARAMETERS_BYTES);
         assertEquals("inline", descriptor.getContentDispositionType());
@@ -238,23 +238,23 @@ public class MaximalBodyDescriptorTest e
         assertEquals("1", descriptor.getContentDispositionParameters().get("one"));
         assertEquals("bar", descriptor.getContentDispositionParameters().get("foo"));
     }
-    
+
     public void testContentDispositionStandardParameters() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_BYTES, 1);
         assertEquals("attachment", descriptor.getContentDispositionType());
         assertNotNull(descriptor.getContentDispositionParameters());
         assertEquals(5, descriptor.getContentDispositionParameters().size());
         assertEquals("blob.png", descriptor.getContentDispositionFilename());
-        
+
         SimpleDateFormat dateparser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         dateparser.setTimeZone(TimeZone.getTimeZone("GMT"));
-        
+
         assertEquals(dateparser.parse("2008-06-21 15:32:18"), descriptor.getContentDispositionModificationDate());
         assertEquals(dateparser.parse("2008-06-20 10:15:09"), descriptor.getContentDispositionCreationDate());
         assertEquals(dateparser.parse("2008-06-22 12:08:56"), descriptor.getContentDispositionReadDate());
         assertEquals(10234, descriptor.getContentDispositionSize());
     }
-    
+
     public void testLanguageParameters() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_BINARY_ATTACHMENTS_BYTES, 3);
         assertNotNull(descriptor.getContentLanguage());
@@ -263,32 +263,32 @@ public class MaximalBodyDescriptorTest e
         assertEquals("en-US", descriptor.getContentLanguage().get(1));
         assertEquals("en-CA", descriptor.getContentLanguage().get(2));
     }
-    
+
     public void testContentLocationRelativeUrl() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_CONTENT_LOCATION_BYTES, 0);
         assertEquals("relative/url", descriptor.getContentLocation());
     }
-    
+
     public void testContentLocationAbsoluteUrl() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_CONTENT_LOCATION_BYTES, 1);
         assertEquals("http://www.example.org/absolute/rhubard.txt", descriptor.getContentLocation());
     }
-    
+
     public void testContentLocationWithComment() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_CONTENT_LOCATION_BYTES, 3);
         assertEquals("http://www.example.org/absolute/comments/rhubard.txt", descriptor.getContentLocation());
     }
-    
+
     public void testContentLocationFoldedUrl() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.MULTIPART_WITH_CONTENT_LOCATION_BYTES, 4);
         assertEquals("http://www.example.org/this/is/a/very/long/url/split/over/two/lines/", descriptor.getContentLocation());
     }
-    
+
     public void testContentMD5Url() throws Exception {
         MaximalBodyDescriptor descriptor = describe(ExampleMail.ONE_PART_MIME_WITH_CONTENT_DISPOSITION_PARAMETERS_BYTES);
         assertEquals(ExampleMail.MD5_CONTENT, descriptor.getContentMD5Raw());
     }
-    
+
     private MaximalBodyDescriptor describe(byte[] mail, int zeroBasedPart) throws Exception {
         ByteArrayInputStream bias = new ByteArrayInputStream(mail);
         parser.parse(bias);
@@ -305,12 +305,12 @@ public class MaximalBodyDescriptorTest e
         assertTrue("Parser is maximal so body descriptor should be maximal", descriptor instanceof MaximalBodyDescriptor);
         return (MaximalBodyDescriptor) descriptor;
     }
-    
+
     private MaximalBodyDescriptor describe(byte[] mail) throws Exception {
         ByteArrayInputStream bias = new ByteArrayInputStream(mail);
         parser.parse(bias);
         EntityState state = parser.next();
-        while (state != EntityState.T_BODY && state != EntityState.T_END_OF_STREAM) 
+        while (state != EntityState.T_BODY && state != EntityState.T_END_OF_STREAM)
         {
             state = parser.next();
         }

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/LoggingMonitor.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/LoggingMonitor.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/LoggingMonitor.java (original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/dom/LoggingMonitor.java Mon Jul 11 19:48:50 2011
@@ -25,7 +25,7 @@ import org.apache.james.mime4j.codec.Dec
 
 public final class LoggingMonitor extends DecodeMonitor {
     private static Log log = LogFactory.getLog(LoggingMonitor.class);
-    
+
     public static DecodeMonitor MONITOR = new LoggingMonitor();
 
     @Override
@@ -37,8 +37,8 @@ public final class LoggingMonitor extend
         }
         return false;
     }
-    
+
     public boolean isListening() {
         return true;
     }
-}
\ No newline at end of file
+}

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java (original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/transform/TransformMessage.java Mon Jul 11 19:48:50 2011
@@ -67,7 +67,7 @@ public class TransformMessage {
         Message transformed = transform(template);
 
         MessageWriter writer = new DefaultMessageWriter();
-        
+
         // Print transformed message.
         System.out.println("\n\nTransformed message:\n--------------------\n");
         writer.writeMessage(transformed, System.out);

Modified: james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java (original)
+++ james/mime4j/trunk/examples/src/main/java/org/apache/james/mime4j/samples/tree/MessageTree.java Mon Jul 11 19:48:50 2011
@@ -302,7 +302,7 @@ public class MessageTree extends JPanel 
                 ContentTypeField field = (ContentTypeField) o;
                 StringBuilder sb = new StringBuilder();
                 sb.append("MIME type: " + field.getMimeType() + "\n");
-                for (Map.Entry<String, String> entry : field.getParameters().entrySet()) { 
+                for (Map.Entry<String, String> entry : field.getParameters().entrySet()) {
                     sb.append(entry.getKey() + " = " + entry.getValue() + "\n");
                 }
                 textView.setText(sb.toString());

Modified: james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageBodyFactory.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageBodyFactory.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageBodyFactory.java (original)
+++ james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageBodyFactory.java Mon Jul 11 19:48:50 2011
@@ -52,7 +52,7 @@ public class StorageBodyFactory implemen
     /**
      * Creates a new <code>BodyFactory</code> instance that uses the given
      * storage provider for creating message bodies from input streams.
-     * 
+     *
      * @param storageProvider
      *            a storage provider or <code>null</code> to use the default
      *            one.
@@ -60,16 +60,16 @@ public class StorageBodyFactory implemen
     public StorageBodyFactory(
             final StorageProvider storageProvider,
             final DecodeMonitor monitor) {
-        this.storageProvider = 
+        this.storageProvider =
             storageProvider != null ? storageProvider : DefaultStorageProvider.getInstance();
-        this.monitor = 
+        this.monitor =
             monitor != null ? monitor : DecodeMonitor.SILENT;
     }
 
     /**
      * Returns the <code>StorageProvider</code> this <code>BodyFactory</code>
      * uses to create message bodies from input streams.
-     * 
+     *
      * @return a <code>StorageProvider</code>.
      */
     public StorageProvider getStorageProvider() {
@@ -79,7 +79,7 @@ public class StorageBodyFactory implemen
     /**
      * Creates a {@link BinaryBody} that holds the content of the given input
      * stream.
-     * 
+     *
      * @param is
      *            input stream to create a message body from.
      * @return a binary body.
@@ -103,7 +103,7 @@ public class StorageBodyFactory implemen
      * method. Instead the message body created by this method takes care of
      * deleting the storage when it gets disposed of (see
      * {@link Disposable#dispose()}).
-     * 
+     *
      * @param storage
      *            storage to create a message body from.
      * @return a binary body.
@@ -124,7 +124,7 @@ public class StorageBodyFactory implemen
      * &quot;us-ascii&quot; is used to decode the byte content of the
      * <code>Storage</code> into a character stream when calling
      * {@link TextBody#getReader() getReader()} on the returned object.
-     * 
+     *
      * @param is
      *            input stream to create a message body from.
      * @return a text body.
@@ -149,7 +149,7 @@ public class StorageBodyFactory implemen
      * calling {@link TextBody#getReader() getReader()} on the returned object.
      * If the MIME charset has no corresponding Java charset or the Java charset
      * cannot be used for decoding then &quot;us-ascii&quot; is used instead.
-     * 
+     *
      * @param is
      *            input stream to create a message body from.
      * @param mimeCharset
@@ -183,7 +183,7 @@ public class StorageBodyFactory implemen
      * method. Instead the message body created by this method takes care of
      * deleting the storage when it gets disposed of (see
      * {@link Disposable#dispose()}).
-     * 
+     *
      * @param storage
      *            storage to create a message body from.
      * @return a text body.
@@ -214,7 +214,7 @@ public class StorageBodyFactory implemen
      * method. Instead the message body created by this method takes care of
      * deleting the storage when it gets disposed of (see
      * {@link Disposable#dispose()}).
-     * 
+     *
      * @param storage
      *            storage to create a message body from.
      * @param mimeCharset
@@ -241,7 +241,7 @@ public class StorageBodyFactory implemen
      * a byte stream when calling
      * {@link SingleBody#writeTo(java.io.OutputStream) writeTo(OutputStream)} on
      * the returned object.
-     * 
+     *
      * @param text
      *            text to create a message body from.
      * @return a text body.
@@ -262,7 +262,7 @@ public class StorageBodyFactory implemen
      * the returned object. If the MIME charset has no corresponding Java
      * charset or the Java charset cannot be used for encoding then
      * &quot;us-ascii&quot; is used instead.
-     * 
+     *
      * @param text
      *            text to create a message body from.
      * @param mimeCharset
@@ -280,7 +280,7 @@ public class StorageBodyFactory implemen
     }
 
     private static Charset toJavaCharset(
-            final String mimeCharset, 
+            final String mimeCharset,
             boolean forEncoding,
             final DecodeMonitor monitor) {
         Charset charset = CharsetUtil.lookup(mimeCharset);

Modified: james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageOutputStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageOutputStream.java?rev=1145308&r1=1145307&r2=1145308&view=diff
==============================================================================
--- james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageOutputStream.java (original)
+++ james/mime4j/trunk/storage/src/main/java/org/apache/james/mime4j/storage/StorageOutputStream.java Mon Jul 11 19:48:50 2011
@@ -56,7 +56,7 @@ public abstract class StorageOutputStrea
      * for some implementations it is not possible to create another
      * <code>Storage</code> object that can be read from and deleted
      * independently (e.g. if the implementation writes to a file).
-     * 
+     *
      * @return a <code>Storage</code> object as described above.
      * @throws IOException
      *             if an I/O error occurs.
@@ -125,7 +125,7 @@ public abstract class StorageOutputStrea
      * <p>
      * This implementation never throws an {@link IOException} but a subclass
      * might.
-     * 
+     *
      * @throws IOException
      *             if an I/O error occurs.
      */
@@ -141,7 +141,7 @@ public abstract class StorageOutputStrea
      * {@link #write(byte[], int, int)}. All the required preconditions have
      * already been checked by these methods, including the check if the output
      * stream has already been closed.
-     * 
+     *
      * @param buffer
      *            buffer containing bytes to write.
      * @param offset
@@ -160,7 +160,7 @@ public abstract class StorageOutputStrea
      * <code>StorageOutputStream</code>. This method gets called by
      * {@link #toStorage()} after the preconditions have been checked. The
      * implementation can also be sure that this methods gets invoked only once.
-     * 
+     *
      * @return a <code>Storage</code> object as described above.
      * @throws IOException
      *             if an I/O error occurs.