You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/07/17 02:24:30 UTC

[james-project] 16/31: [REFACTORING] MimeBodyElement should use StandardCharset

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

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

commit 0779deadcfc42a78ffe4c3d91dfcf99af372b8c0
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Thu Jul 16 11:40:58 2020 +0700

    [REFACTORING] MimeBodyElement should use StandardCharset
---
 .../java/org/apache/james/imap/processor/fetch/MimeBodyElement.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MimeBodyElement.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MimeBodyElement.java
index 9991dcf..715674c 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MimeBodyElement.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/MimeBodyElement.java
@@ -18,11 +18,12 @@
  ****************************************************************/
 package org.apache.james.imap.processor.fetch;
 
+import static java.nio.charset.StandardCharsets.US_ASCII;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.nio.charset.Charset;
 import java.util.List;
 
 import org.apache.james.imap.api.ImapConstants;
@@ -30,7 +31,6 @@ import org.apache.james.imap.message.response.FetchResponse.BodyElement;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.Header;
 
-
 /**
  * {@link BodyElement} which represent a MIME element specified by for example (BODY[1.MIME])
  *
@@ -41,8 +41,6 @@ public class MimeBodyElement implements BodyElement {
     protected final List<Header> headers;
 
     protected long size;
-    private static final Charset US_ASCII = Charset.forName("US-ASCII");
-
 
     public MimeBodyElement(String name, List<Header> headers) throws MailboxException {
         super();


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