You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2020/10/26 02:55:06 UTC

[james-project] 03/11: JAMES-3430 Remove unused boundary property

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit fcdb50b9afc388b42a96b6f0ddf54869b5d64532
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Oct 20 16:06:14 2020 +0700

    JAMES-3430 Remove unused boundary property
---
 .../james/mailbox/maildir/mail/model/MaildirMessage.java     |  4 ----
 .../org/apache/james/mailbox/store/StoreMessageManager.java  |  4 ----
 .../apache/james/mailbox/store/mail/model/StandardNames.java |  6 ------
 .../james/mailbox/store/mail/model/impl/Properties.java      | 12 ------------
 .../james/mailbox/store/mail/model/impl/PropertyBuilder.java | 11 -----------
 5 files changed, 37 deletions(-)

diff --git a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
index af337cb..9878e06 100644
--- a/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
+++ b/mailbox/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/model/MaildirMessage.java
@@ -118,10 +118,6 @@ public class MaildirMessage implements Message {
                 propertyBuilder.setCharset(codeset);
             }
 
-            final String boundary = descriptor.getBoundary();
-            if (boundary != null) {
-                propertyBuilder.setBoundary(boundary);
-            }
             if ("text".equalsIgnoreCase(mediaType)) {
                 long lines = -1;
                 try (CountingInputStream bodyStream = new CountingInputStream(parser.getInputStream())) {
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
index 53079f4..fb4f79d 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
@@ -478,10 +478,6 @@ public class StoreMessageManager implements MessageManager {
         } else {
             propertyBuilder.setCharset(codeset);
         }
-        final String boundary = descriptor.getBoundary();
-        if (boundary != null) {
-            propertyBuilder.setBoundary(boundary);
-        }
         return propertyBuilder;
     }
 
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/StandardNames.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/StandardNames.java
index a50eaf5..32e5fee 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/StandardNames.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/StandardNames.java
@@ -94,12 +94,6 @@ public class StandardNames {
     public static final String MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME = "charset";
     
     /**
-     * Namespace for <a href='http://www.faqs.org/rfcs/rfc2045.html'>MIME</a> Content-Type
-     * "boundary" parameter.
-     */
-    public static final String MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME = "boundary";
-    
-    /**
      * Namespace for <a href='http://www.faqs.org/rfcs/rfc2045.html'>MIME</a> mime type properties.
      * A distinct namespace is required to distinguish these properties from the Content-Type
      * parameters.
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/Properties.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/Properties.java
index b8900a4..52d0406 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/Properties.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/Properties.java
@@ -33,7 +33,6 @@ import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTE
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_MD5_SPACE;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TRANSFER_ENCODING_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TRANSFER_ENCODING_SPACE;
-import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_SPACE;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_MEDIA_TYPE_NAME;
@@ -219,17 +218,6 @@ public class Properties {
     public String getCharset() {
         return getFirstValue(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME);
     }
-
-    
-    /**
-     * Gets the RFC2045 Content-Type "boundary" parameter.
-     * 
-     * @return the RFC2045 Content-Type "boundary" parameter, 
-     * or null if this meta data is not present
-     */
-    public String getBoundary() {
-        return getFirstValue(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME);
-    }
     
     /**
      * Gets the RFC1766 Content-Language.
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java
index 0abf1ee..74f5409 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/PropertyBuilder.java
@@ -33,7 +33,6 @@ import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTE
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_MD5_SPACE;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TRANSFER_ENCODING_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TRANSFER_ENCODING_SPACE;
-import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_CHARSET_NAME;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_CONTENT_TYPE_PARAMETER_SPACE;
 import static org.apache.james.mailbox.store.mail.model.StandardNames.MIME_MEDIA_TYPE_NAME;
@@ -240,16 +239,6 @@ public class PropertyBuilder {
     }
     
     /**
-     * Sets RFC2045 Content-Type "boundary" parameter.
-     * 
-     * @param value the RFC2045 Content-Type "boundary" parameter
-     * or null to remove
-     */
-    public void setBoundary(String value) {
-        setProperty(MIME_CONTENT_TYPE_PARAMETER_SPACE, MIME_CONTENT_TYPE_PARAMETER_BOUNDARY_NAME, value);
-    }
-    
-    /**
      * Sets RFC1766 Content-Language.
      * 
      * @param values list of parsed language tags from the RFC1766 Content-Language, 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org