james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1147788 - in /james/mime4j/trunk: core/src/main/java/org/apache/james/mime4j/parser/ core/src/main/java/org/apache/james/mime4j/stream/ core/src/test/java/org/apache/james/mime4j/parser/ core/src/test/java/org/apache/james/mime4j/stream/ d...
Date Mon, 18 Jul 2011 08:52:20 GMT
Author: olegk
Date: Mon Jul 18 08:52:18 2011
New Revision: 1147788

URL: http://svn.apache.org/viewvc?rev=1147788&view=rev
Log:
Renamed MimeEntityConfig to MimeConfig

Added:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeConfig.java
      - copied, changed from r1147768, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java
Removed:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java
Modified:
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java
    james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeEntityTest.java
    james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
    james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
    james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/message/MaximalBodyDescriptorTest.java

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/parser/MimeStreamParser.java
Mon Jul 18 08:52:18 2011
@@ -28,7 +28,7 @@ import org.apache.james.mime4j.stream.Bo
 import org.apache.james.mime4j.stream.BodyDescriptorBuilder;
 import org.apache.james.mime4j.stream.EntityState;
 import org.apache.james.mime4j.stream.Field;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 import org.apache.james.mime4j.stream.MimeTokenStream;
 import org.apache.james.mime4j.stream.RecursionMode;
 
@@ -66,19 +66,19 @@ public class MimeStreamParser {
     }
 
     public MimeStreamParser(
-            final MimeEntityConfig config,
+            final MimeConfig config,
             final DecodeMonitor monitor,
             final BodyDescriptorBuilder bodyDescBuilder) {
-        this(new MimeTokenStream(config != null ? config.clone() : new MimeEntityConfig(),
+        this(new MimeTokenStream(config != null ? config.clone() : new MimeConfig(),
                 monitor, bodyDescBuilder));
     }
 
-    public MimeStreamParser(final MimeEntityConfig config) {
+    public MimeStreamParser(final MimeConfig config) {
         this(config, null, null);
     }
 
     public MimeStreamParser() {
-        this(new MimeTokenStream(new MimeEntityConfig(), null, null));
+        this(new MimeTokenStream(new MimeConfig(), null, null));
     }
 
     /**
@@ -99,8 +99,8 @@ public class MimeStreamParser {
 
     /**
      * Parses a stream of bytes containing a MIME message. Please note that if the
-     * {@link MimeEntityConfig} associated with the mime stream returns a not null Content-Type
-     * value from its {@link MimeEntityConfig#getHeadlessParsing()} method, the message is
+     * {@link MimeConfig} associated with the mime stream returns a not null Content-Type
+     * value from its {@link MimeConfig#getHeadlessParsing()} method, the message is
      * assumed to have no head section and the headless parsing mode will be used.
      *
      * @param instream the stream to parse.
@@ -108,7 +108,7 @@ public class MimeStreamParser {
      * @throws IOException on I/O errors.
      */
     public void parse(InputStream instream) throws MimeException, IOException {
-        MimeEntityConfig config = mimeTokenStream.getConfig();
+        MimeConfig config = mimeTokenStream.getConfig();
         if (config.getHeadlessParsing() != null) {
             Field contentType = mimeTokenStream.parseHeadless(
                     instream, config.getHeadlessParsing());

Copied: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeConfig.java
(from r1147768, james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java)
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeConfig.java?p2=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeConfig.java&p1=james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java&r1=1147768&r2=1147788&rev=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntityConfig.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeConfig.java Mon
Jul 18 08:52:18 2011
@@ -24,7 +24,7 @@ import org.apache.james.mime4j.MimeExcep
 /**
  * Properties used to configure the behavior of MIME stream parsers.
  */
-public final class MimeEntityConfig implements Cloneable {
+public final class MimeConfig implements Cloneable {
 
     private boolean strictParsing;
     private int maxLineLen;
@@ -35,7 +35,7 @@ public final class MimeEntityConfig impl
     private String headlessParsing;
     private boolean malformedHeaderStartsBody;
 
-    public MimeEntityConfig() {
+    public MimeConfig() {
         this.strictParsing = false;
         this.countLineNumbers = false;
         this.malformedHeaderStartsBody = false;
@@ -256,9 +256,9 @@ public final class MimeEntityConfig impl
     }
 
     @Override
-    public MimeEntityConfig clone() {
+    public MimeConfig clone() {
         try {
-            return (MimeEntityConfig) super.clone();
+            return (MimeConfig) super.clone();
         } catch (CloneNotSupportedException e) {
             // this shouldn't happen, since we are Cloneable
             throw new InternalError();

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java (original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeEntity.java Mon
Jul 18 08:52:18 2011
@@ -41,7 +41,7 @@ import org.apache.james.mime4j.util.Mime
 class MimeEntity implements EntityStateMachine {
 
     private final EntityState endState;
-    private final MimeEntityConfig config;
+    private final MimeConfig config;
     private final DecodeMonitor monitor;
     private final FieldBuilder fieldBuilder;
     private final BodyDescriptorBuilder bodyDescBuilder;
@@ -66,7 +66,7 @@ class MimeEntity implements EntityStateM
     MimeEntity(
             LineNumberSource lineSource,
             InputStream instream,
-            MimeEntityConfig config,
+            MimeConfig config,
             EntityState startState,
             EntityState endState,
             DecodeMonitor monitor,
@@ -96,7 +96,7 @@ class MimeEntity implements EntityStateM
     MimeEntity(
             LineNumberSource lineSource,
             InputStream instream,
-            MimeEntityConfig config,
+            MimeConfig config,
             EntityState startState,
             EntityState endState,
             BodyDescriptorBuilder bodyDescBuilder) {
@@ -109,7 +109,7 @@ class MimeEntity implements EntityStateM
     MimeEntity(
             LineNumberSource lineSource,
             InputStream instream,
-            MimeEntityConfig config,
+            MimeConfig config,
             BodyDescriptorBuilder bodyDescBuilder) {
         this(lineSource, instream, config,
                 EntityState.T_START_MESSAGE, EntityState.T_END_MESSAGE,
@@ -123,7 +123,7 @@ class MimeEntity implements EntityStateM
             InputStream instream,
             FieldBuilder fieldBuilder,
             BodyDescriptorBuilder bodyDescBuilder) {
-        this(lineSource, instream, new MimeEntityConfig(),
+        this(lineSource, instream, new MimeConfig(),
                 EntityState.T_START_MESSAGE, EntityState.T_END_MESSAGE,
                 DecodeMonitor.SILENT,
                 fieldBuilder,
@@ -134,7 +134,7 @@ class MimeEntity implements EntityStateM
             LineNumberSource lineSource,
             InputStream instream,
             BodyDescriptorBuilder bodyDescBuilder) {
-        this(lineSource, instream, new MimeEntityConfig(),
+        this(lineSource, instream, new MimeConfig(),
                 EntityState.T_START_MESSAGE, EntityState.T_END_MESSAGE,
                 DecodeMonitor.SILENT,
                 new DefaultFieldBuilder(-1),

Modified: james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
(original)
+++ james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j/stream/MimeTokenStream.java
Mon Jul 18 08:52:18 2011
@@ -77,7 +77,7 @@ import org.apache.james.mime4j.util.Char
  */
 public class MimeTokenStream {
 
-    private final MimeEntityConfig config;
+    private final MimeConfig config;
     private final DecodeMonitor monitor;
     private final FieldBuilder fieldBuilder;
     private final BodyDescriptorBuilder bodyDescBuilder;
@@ -91,39 +91,39 @@ public class MimeTokenStream {
     /**
      * Constructs a standard (lax) stream.
      * Optional validation events will be logged only.
-     * Use {@link MimeEntityConfig#setStrictParsing(boolean)} to turn on strict
+     * Use {@link MimeConfig#setStrictParsing(boolean)} to turn on strict
      * parsing mode and pass the config object to
-     * {@link MimeTokenStream#MimeTokenStream(MimeEntityConfig)} to create
+     * {@link MimeTokenStream#MimeTokenStream(MimeConfig)} to create
      * a stream that strictly validates the input.
      */
     public MimeTokenStream() {
         this(null);
     }
 
-    public MimeTokenStream(final MimeEntityConfig config) {
+    public MimeTokenStream(final MimeConfig config) {
         this(config, null, null, null);
     }
 
     public MimeTokenStream(
-            final MimeEntityConfig config,
+            final MimeConfig config,
             final BodyDescriptorBuilder bodyDescBuilder) {
         this(config, null, null, bodyDescBuilder);
     }
 
     public MimeTokenStream(
-            final MimeEntityConfig config,
+            final MimeConfig config,
             final DecodeMonitor monitor,
             final BodyDescriptorBuilder bodyDescBuilder) {
         this(config, monitor, null, bodyDescBuilder);
     }
 
     public MimeTokenStream(
-            final MimeEntityConfig config,
+            final MimeConfig config,
             final DecodeMonitor monitor,
             final FieldBuilder fieldBuilder,
             final BodyDescriptorBuilder bodyDescBuilder) {
         super();
-        this.config = config != null ? config : new MimeEntityConfig();
+        this.config = config != null ? config : new MimeConfig();
         this.fieldBuilder = fieldBuilder != null ? fieldBuilder :
             new DefaultFieldBuilder(this.config.getMaxHeaderLen());
         this.monitor = monitor != null ? monitor :
@@ -388,7 +388,7 @@ public class MimeTokenStream {
     }
 
 
-    public MimeEntityConfig getConfig() {
+    public MimeConfig getConfig() {
         return config;
     }
 }

Modified: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/parser/MimeStreamParserExampleMessagesTest.java
Mon Jul 18 08:52:18 2011
@@ -38,7 +38,7 @@ import junit.framework.TestSuite;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.james.mime4j.parser.MimeStreamParser;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 /**
  * Creates a TestSuite running the test for each .msg file in the test resouce folder.
@@ -57,7 +57,7 @@ public class MimeStreamParserExampleMess
     protected void runTest() throws Throwable {
         MimeStreamParser parser = null;
         TestHandler handler = null;
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         if (getName().startsWith("malformedHeaderStartsBody")) {
             config.setMalformedHeaderStartsBody(true);
         }

Modified: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeEntityTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeEntityTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeEntityTest.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/MimeEntityTest.java
Mon Jul 18 08:52:18 2011
@@ -395,7 +395,7 @@ public class MimeEntityTest extends Test
     }
 
     public void testMaxLineLimitCheck() throws Exception {
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMaxLineLen(50);
 
         String message =
@@ -461,7 +461,7 @@ public class MimeEntityTest extends Test
         LineNumberInputStream lineInput = new LineNumberInputStream(instream);
         BufferedLineReaderInputStream rawstream = new BufferedLineReaderInputStream(lineInput,
12);
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMaxLineLen(100);
         config.setMaxHeaderLen(200);
         MimeEntity entity = new MimeEntity(
@@ -489,7 +489,7 @@ public class MimeEntityTest extends Test
     }
 
     public void testMaxHeaderLengthMayExceedMaxLineLength() throws Exception {
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMaxLineLen(50);
         config.setMaxHeaderLen(130);
 
@@ -557,7 +557,7 @@ public class MimeEntityTest extends Test
         LineNumberInputStream lineInput = new LineNumberInputStream(instream);
         BufferedLineReaderInputStream rawstream = new BufferedLineReaderInputStream(lineInput,
12);
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMaxHeaderCount(20);
         MimeEntity entity = new MimeEntity(
                 lineInput,
@@ -603,7 +603,7 @@ public class MimeEntityTest extends Test
         LineNumberInputStream lineInput = new LineNumberInputStream(instream);
         BufferedLineReaderInputStream rawstream = new BufferedLineReaderInputStream(lineInput,
12);
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMaxContentLen(100);
         MimeEntity entity = new MimeEntity(
                 lineInput,

Modified: james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java
(original)
+++ james/mime4j/trunk/core/src/test/java/org/apache/james/mime4j/stream/StrictMimeTokenStreamTest.java
Mon Jul 18 08:52:18 2011
@@ -36,7 +36,7 @@ public class StrictMimeTokenStreamTest e
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setStrictParsing(true);
         parser = new MimeTokenStream(config);
     }

Modified: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
(original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/DefaultMessageBuilder.java
Mon Jul 18 08:52:18 2011
@@ -41,7 +41,7 @@ import org.apache.james.mime4j.parser.Ab
 import org.apache.james.mime4j.parser.MimeStreamParser;
 import org.apache.james.mime4j.stream.BodyDescriptorBuilder;
 import org.apache.james.mime4j.stream.Field;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 /**
  * Default implementation of {@link MessageBuilder}.
@@ -50,7 +50,7 @@ public class DefaultMessageBuilder imple
 
     private FieldParser<? extends ParsedField> fieldParser = null;
     private BodyFactory bodyFactory = null;
-    private MimeEntityConfig config = null;
+    private MimeConfig config = null;
     private BodyDescriptorBuilder bodyDescBuilder = null;
     private boolean contentDecoding = true;
     private boolean flatMode = false;
@@ -68,7 +68,7 @@ public class DefaultMessageBuilder imple
         this.bodyFactory = bodyFactory;
     }
 
-    public void setMimeEntityConfig(final MimeEntityConfig config) {
+    public void setMimeEntityConfig(final MimeConfig config) {
         this.config = config;
     }
 
@@ -247,7 +247,7 @@ public class DefaultMessageBuilder imple
     }
 
     public Header parseHeader(final InputStream is) throws IOException, MimeIOException {
-        final MimeEntityConfig cfg = config != null ? config : new MimeEntityConfig();
+        final MimeConfig cfg = config != null ? config : new MimeConfig();
         boolean strict = cfg.isStrictParsing();
         final DecodeMonitor mon = monitor != null ? monitor :
             strict ? DecodeMonitor.STRICT : DecodeMonitor.SILENT;
@@ -290,7 +290,7 @@ public class DefaultMessageBuilder imple
     public Message parseMessage(final InputStream is) throws IOException, MimeIOException
{
         try {
             MessageImpl message = new MessageImpl();
-            MimeEntityConfig cfg = config != null ? config : new MimeEntityConfig();
+            MimeConfig cfg = config != null ? config : new MimeConfig();
             boolean strict = cfg.isStrictParsing();
             DecodeMonitor mon = monitor != null ? monitor :
                 strict ? DecodeMonitor.STRICT : DecodeMonitor.SILENT;

Modified: james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
(original)
+++ james/mime4j/trunk/dom/src/main/java/org/apache/james/mime4j/message/MessageServiceFactoryImpl.java
Mon Jul 18 08:52:18 2011
@@ -22,7 +22,7 @@ import org.apache.james.mime4j.dom.Messa
 import org.apache.james.mime4j.dom.MessageServiceFactory;
 import org.apache.james.mime4j.dom.MessageWriter;
 import org.apache.james.mime4j.stream.BodyDescriptorBuilder;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 /**
  * The default MessageBuilderFactory bundled with Mime4j.
@@ -33,7 +33,7 @@ import org.apache.james.mime4j.stream.Mi
 public class MessageServiceFactoryImpl extends MessageServiceFactory {
 
     private BodyFactory bodyFactory = null;
-    private MimeEntityConfig mimeEntityConfig = null;
+    private MimeConfig mimeEntityConfig = null;
     private BodyDescriptorBuilder bodyDescriptorBuilder = null;
     private Boolean flatMode = null;
     private Boolean contentDecoding = null;
@@ -63,8 +63,8 @@ public class MessageServiceFactoryImpl e
                 return;
             } else throw new IllegalArgumentException("Unsupported attribute value type for
"+name+", expected a BodyFactory");
         } else if ("MimeEntityConfig".equals(name)) {
-            if (value instanceof MimeEntityConfig) {
-                this.mimeEntityConfig = (MimeEntityConfig) value;
+            if (value instanceof MimeConfig) {
+                this.mimeEntityConfig = (MimeConfig) value;
                 return;
             } else throw new IllegalArgumentException("Unsupported attribute value type for
"+name+", expected a MimeEntityConfig");
         } else if ("MutableBodyDescriptorFactory".equals(name)) {

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/ExampleMessagesRoundtripTest.java
Mon Jul 18 08:52:18 2011
@@ -40,7 +40,7 @@ import org.apache.james.mime4j.codec.Cod
 import org.apache.james.mime4j.dom.Message;
 import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.message.DefaultMessageWriter;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 /**
  * Creates a TestSuite running the test for each .msg file in the test resouce folder.
@@ -57,7 +57,7 @@ public class ExampleMessagesRoundtripTes
 
     @Override
     protected void runTest() throws Throwable {
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         if (getName().startsWith("malformedHeaderStartsBody")) {
             config.setMalformedHeaderStartsBody(true);
         }

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageHeadlessParserTest.java
Mon Jul 18 08:52:18 2011
@@ -29,7 +29,7 @@ import org.apache.james.mime4j.dom.TextB
 import org.apache.james.mime4j.dom.field.ContentTypeField;
 import org.apache.james.mime4j.dom.field.FieldName;
 import org.apache.james.mime4j.message.DefaultMessageBuilder;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 public class MessageHeadlessParserTest extends TestCase {
 
@@ -42,7 +42,7 @@ public class MessageHeadlessParserTest e
                 + "\r\n"
                 + "Instead this should be better parsed as a text/plain body\r\n";
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMalformedHeaderStartsBody(true);
         DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
@@ -62,7 +62,7 @@ public class MessageHeadlessParserTest e
                 + "\r\n"
                 + "Instead this should be better parsed as a text/plain body\r\n";
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setMalformedHeaderStartsBody(true);
         DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);
@@ -91,7 +91,7 @@ public class MessageHeadlessParserTest e
                 + "Content-Type: image/jpeg\r\n" + "\r\n"
                 + "all kind of stuff\r\n" + "--foo--\r\n";
 
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setHeadlessParsing(contentType);
         DefaultMessageBuilder builder = new DefaultMessageBuilder();
         builder.setMimeEntityConfig(config);

Modified: james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java?rev=1147788&r1=1147787&r2=1147788&view=diff
==============================================================================
--- james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
(original)
+++ james/mime4j/trunk/dom/src/test/java/org/apache/james/mime4j/dom/MessageParserTest.java
Mon Jul 18 08:52:18 2011
@@ -47,7 +47,7 @@ import org.apache.james.mime4j.field.Fie
 import org.apache.james.mime4j.message.MessageImpl;
 import org.apache.james.mime4j.message.DefaultMessageBuilder;
 import org.apache.james.mime4j.stream.Field;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 
 public class MessageParserTest extends TestCase {
 
@@ -103,7 +103,7 @@ public class MessageParserTest extends T
 
     @Override
     protected void runTest() throws IOException {
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         if (getName().startsWith("malformedHeaderStartsBody")) {
             config.setMalformedHeaderStartsBody(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=1147788&r1=1147787&r2=1147788&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 18 08:52:18 2011
@@ -29,7 +29,7 @@ import org.apache.james.mime4j.ExampleMa
 import org.apache.james.mime4j.stream.BodyDescriptor;
 import org.apache.james.mime4j.stream.BodyDescriptorBuilder;
 import org.apache.james.mime4j.stream.EntityState;
-import org.apache.james.mime4j.stream.MimeEntityConfig;
+import org.apache.james.mime4j.stream.MimeConfig;
 import org.apache.james.mime4j.stream.MimeTokenStream;
 import org.apache.james.mime4j.stream.RawField;
 
@@ -40,7 +40,7 @@ public class MaximalBodyDescriptorTest e
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        MimeEntityConfig config = new MimeEntityConfig();
+        MimeConfig config = new MimeConfig();
         config.setStrictParsing(true);
         parser = new MimeTokenStream(config, new DefaultBodyDescriptorBuilder(null));
     }



Mime
View raw message