james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r886266 - /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java
Date Wed, 02 Dec 2009 19:12:46 GMT
Author: olegk
Date: Wed Dec  2 19:12:45 2009
New Revision: 886266

URL: http://svn.apache.org/viewvc?rev=886266&view=rev
Log:
MIME4J-141: removed unnecessary MimeUtil.unfold() call in AbstractField

Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java?rev=886266&r1=886265&r2=886266&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/field/AbstractField.java
Wed Dec  2 19:12:45 2009
@@ -149,21 +149,13 @@
 
     private static ParsedField parse(final ByteSequence raw, final String rawStr)
             throws MimeException {
-        /*
-         * Unfold the field.
-         */
-        final String unfolded = MimeUtil.unfold(rawStr);
-
-        /*
-         * Split into name and value.
-         */
-        final Matcher fieldMatcher = FIELD_NAME_PATTERN.matcher(unfolded);
+        final Matcher fieldMatcher = FIELD_NAME_PATTERN.matcher(rawStr);
         if (!fieldMatcher.find()) {
             throw new MimeException("Invalid field in string");
         }
         final String name = fieldMatcher.group(1);
 
-        String body = unfolded.substring(fieldMatcher.end());
+        String body = rawStr.substring(fieldMatcher.end());
         if (body.length() > 0 && body.charAt(0) == ' ') {
             body = body.substring(1);
         }



Mime
View raw message