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 2018/01/03 03:20:41 UTC

[7/9] james-project git commit: JAMES-2270 Replace uses of considered-deprecated constants

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/mdn/src/main/java/org/apache/james/mdn/MDN.java
----------------------------------------------------------------------
diff --git a/mdn/src/main/java/org/apache/james/mdn/MDN.java b/mdn/src/main/java/org/apache/james/mdn/MDN.java
index ad65f8c..e0d8965 100644
--- a/mdn/src/main/java/org/apache/james/mdn/MDN.java
+++ b/mdn/src/main/java/org/apache/james/mdn/MDN.java
@@ -19,6 +19,7 @@
 
 package org.apache.james.mdn;
 
+import java.nio.charset.StandardCharsets;
 import java.util.Objects;
 import java.util.Properties;
 
@@ -29,7 +30,6 @@ import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
 
-import com.google.common.base.Charsets;
 import com.google.common.base.Preconditions;
 
 public class MDN {
@@ -100,7 +100,7 @@ public class MDN {
 
     public BodyPart computeHumanReadablePart() throws MessagingException {
         MimeBodyPart textPart = new MimeBodyPart();
-        textPart.setText(humanReadableText, Charsets.UTF_8.displayName());
+        textPart.setText(humanReadableText, StandardCharsets.UTF_8.displayName());
         textPart.setDisposition(MimeMessage.INLINE);
         return textPart;
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/mdn/src/test/java/org/apache/james/mdn/MDNTest.java
----------------------------------------------------------------------
diff --git a/mdn/src/test/java/org/apache/james/mdn/MDNTest.java b/mdn/src/test/java/org/apache/james/mdn/MDNTest.java
index 2282e05..dede484 100644
--- a/mdn/src/test/java/org/apache/james/mdn/MDNTest.java
+++ b/mdn/src/test/java/org/apache/james/mdn/MDNTest.java
@@ -22,6 +22,7 @@ package org.apache.james.mdn;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
 
 import javax.mail.internet.MimeMessage;
 
@@ -33,8 +34,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import com.google.common.base.Charsets;
-
 import nl.jqno.equalsverifier.EqualsVerifier;
 
 public class MDNTest {
@@ -67,7 +66,7 @@ public class MDNTest {
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         mimeMessage.writeTo(byteArrayOutputStream);
-        assertThat(new String(byteArrayOutputStream.toByteArray(), Charsets.UTF_8))
+        assertThat(new String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8))
             .contains(
                 "Content-Type: text/plain; charset=UTF-8\r\n" +
                 "Content-Transfer-Encoding: 7bit\r\n" +
@@ -92,7 +91,7 @@ public class MDNTest {
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         mimeMessage.writeTo(byteArrayOutputStream);
-        assertThat(new String(byteArrayOutputStream.toByteArray(), Charsets.UTF_8))
+        assertThat(new String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8))
             .contains(
                 "Content-Type: text/plain; charset=UTF-8\r\n" +
                     "Content-Transfer-Encoding: 7bit\r\n" +
@@ -155,7 +154,7 @@ public class MDNTest {
 
         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
         mimeMessage.writeTo(byteArrayOutputStream);
-        assertThat(new String(byteArrayOutputStream.toByteArray(), Charsets.UTF_8))
+        assertThat(new String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8))
             .contains(
                 "Content-Type: text/plain; charset=UTF-8\r\n" +
                     "Content-Transfer-Encoding: 7bit\r\n" +

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
index 41f2ddf..d3ce040 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
@@ -24,6 +24,7 @@ import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.hamcrest.Matchers.equalTo;
 
 import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.Locale;
 
 import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
@@ -36,7 +37,6 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -82,7 +82,7 @@ public abstract class ForwardSmtpTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
         		.setContentType(ContentType.JSON)
         		.setAccept(ContentType.JSON)
-        		.setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+        		.setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
         		.setPort(80)
         		.setBaseUri("http://" + containerIp.getHostAddress())
         		.build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/protocols/imap/src/test/java/org/apache/james/imap/decode/ImapRequestLineReaderTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/decode/ImapRequestLineReaderTest.java b/protocols/imap/src/test/java/org/apache/james/imap/decode/ImapRequestLineReaderTest.java
index 7c285ed..65ab599 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/decode/ImapRequestLineReaderTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/decode/ImapRequestLineReaderTest.java
@@ -21,13 +21,13 @@ package org.apache.james.imap.decode;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
-import com.google.common.base.Charsets;
 import org.apache.james.protocols.imap.DecodingException;
 import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 
 public class ImapRequestLineReaderTest {
 
@@ -37,7 +37,7 @@ public class ImapRequestLineReaderTest {
 
     @Test
     public void nextNonSpaceCharShouldReturnTheFirstCharacter() throws Exception {
-        inputStream = new ByteArrayInputStream(("anyString \n").getBytes(Charsets.US_ASCII));
+        inputStream = new ByteArrayInputStream(("anyString \n").getBytes(StandardCharsets.US_ASCII));
         lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         assertThat(lineReader.nextNonSpaceChar()).isEqualTo('a');
@@ -45,7 +45,7 @@ public class ImapRequestLineReaderTest {
 
     @Test
     public void nextNonSpaceCharShouldIgnoreTheSpaceAndReturnTheFirstNonSpaceCharacter() throws Exception {
-        inputStream = new ByteArrayInputStream(("    anyString \n").getBytes(Charsets.US_ASCII));
+        inputStream = new ByteArrayInputStream(("    anyString \n").getBytes(StandardCharsets.US_ASCII));
         lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         assertThat(lineReader.nextNonSpaceChar()).isEqualTo('a');
@@ -53,7 +53,7 @@ public class ImapRequestLineReaderTest {
 
     @Test(expected = DecodingException.class)
     public void nextNonSpaceCharShouldThrowExceptionWhenNotFound() throws Exception {
-        inputStream = new ByteArrayInputStream(("    ").getBytes(Charsets.US_ASCII));
+        inputStream = new ByteArrayInputStream(("    ").getBytes(StandardCharsets.US_ASCII));
         lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         lineReader.nextNonSpaceChar();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/CreateCommandParserTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/CreateCommandParserTest.java b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/CreateCommandParserTest.java
index d5d2b6a..ae1c813 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/CreateCommandParserTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/CreateCommandParserTest.java
@@ -27,6 +27,7 @@ import static org.mockito.Mockito.when;
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapSessionUtils;
@@ -39,8 +40,6 @@ import org.apache.james.protocols.imap.DecodingException;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
-
 public class CreateCommandParserTest {
     private static final OutputStream outputStream = null;
     private static final ImapCommand command = ImapCommand.anyStateCommand("Command");
@@ -62,7 +61,7 @@ public class CreateCommandParserTest {
 
     @Test
     public void decodeShouldThrowWhenCommandHasEmptyMailbox() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream(" \n".getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream(" \n".getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         assertThatThrownBy(() -> parser.decode(command, lineReader, TAG, mockImapSession))
@@ -71,7 +70,7 @@ public class CreateCommandParserTest {
 
     @Test
     public void decodeShouldThrowWhenCommandHasOnlySeparatorMailbox() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream("..\n".getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream("..\n".getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         assertThatThrownBy(() -> parser.decode(command, lineReader, TAG, mockImapSession))
@@ -80,7 +79,7 @@ public class CreateCommandParserTest {
 
     @Test
     public void decodeShouldReturnCreateRequestWhenValidMailboxName() throws Exception {
-        InputStream inputStream = new ByteArrayInputStream(".AnyMailbox.\n".getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream(".AnyMailbox.\n".getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         CreateRequest imapMessage = (CreateRequest)parser.decode(command, lineReader, TAG, mockImapSession);

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/GetAnnotationCommandParserTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/GetAnnotationCommandParserTest.java b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/GetAnnotationCommandParserTest.java
index 12faf5d..64c2135 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/GetAnnotationCommandParserTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/decode/parser/GetAnnotationCommandParserTest.java
@@ -20,9 +20,11 @@
 package org.apache.james.imap.decode.parser;
 
 import static org.assertj.core.api.Assertions.assertThat;
+
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.process.ImapSession;
@@ -32,7 +34,6 @@ import org.apache.james.imap.message.request.GetAnnotationRequest.Depth;
 import org.apache.james.mailbox.model.MailboxAnnotationKey;
 import org.apache.james.protocols.imap.DecodingException;
 
-import com.google.common.base.Charsets;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -55,7 +56,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowsExceptionWhenCommandHasNotMailbox() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream(" \n".getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream(" \n".getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -63,7 +64,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWhenCommandHasMailboxOnly() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + "    \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + "    \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest) parser.decode(command, lineReader, TAG, session);
@@ -78,7 +79,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasOneKeyButInWrongFormat() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " /private/comment extrastring \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " /private/comment extrastring \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -86,7 +87,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWhenCommandHasOnlyOneKey() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " /private/comment \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " /private/comment \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest) parser.decode(command, lineReader, TAG, session);
@@ -101,7 +102,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasOneInvalidKey() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + "/shared/comment private/comment \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + "/shared/comment private/comment \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -109,7 +110,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWhenCommandHasMultiKeys() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest) parser.decode(command, lineReader, TAG, session);
@@ -124,7 +125,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMultiKeysButInWrongFormat() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (/another/key/group)\n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (/another/key/group)\n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -132,7 +133,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMultiKeysAndSingleKey() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) /another/key \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) /another/key \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -140,7 +141,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMultiKeysButNotOpenQuote() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " /shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " /shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -148,7 +149,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMultiKeysButNotCloseQuote() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -156,7 +157,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMaxsizeOptButInWrongPlace() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (MAXSIZE 1024) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (MAXSIZE 1024) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -164,7 +165,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMaxsizeWithWrongValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE invalid) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE invalid) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -172,7 +173,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMaxsizeWithoutValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -180,7 +181,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMaxsizeDoesNotInParenthesis() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " MAXSIZE 1024 (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " MAXSIZE 1024 (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -188,7 +189,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasMaxsizeDoesNotInParenthesisAndNoValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " MAXSIZE (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " MAXSIZE (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -196,7 +197,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWhenCommandHasMaxsizeOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest) parser.decode(command, lineReader, TAG, session);
@@ -211,7 +212,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasWrongMaxsizeOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZErr 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZErr 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -219,7 +220,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasWrongMaxsizeValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 0) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 0) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -227,7 +228,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasWrongDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH -1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH -1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -235,7 +236,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasWrongDepthOptionName() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTHerr 1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTHerr 1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -243,7 +244,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasDepthOptionButNoValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -251,7 +252,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasDepthOptionButInvalidValue() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH invalid) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH invalid) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -259,7 +260,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasDepthOptionButNotInParenthesis() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " DEPTH (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " DEPTH (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -267,7 +268,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldReturnRequestWhenCommandHasDepthOptionAndValueButNotInParenthesis() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " DEPTH 1 (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " DEPTH 1 (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -275,7 +276,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWithZeroDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 0) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 0) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, null);
@@ -290,7 +291,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWithOneDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 1) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, session);
@@ -305,7 +306,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWhenCommandHasOptionsInAnyOrder() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (DEPTH 1) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (DEPTH 1) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, session);
@@ -320,7 +321,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWithInfinityDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, session);
@@ -335,7 +336,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWithOnlyInfinityDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, session);
@@ -350,7 +351,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test
     public void decodeMessageShouldReturnRequestWithDefaultDepthOptionWhenCommandHasDoesNotHaveDepthOption() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (MAXSIZE 1024) (/shared/comment /private/comment) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         GetAnnotationRequest request = (GetAnnotationRequest)parser.decode(command, lineReader, TAG, session);
@@ -365,7 +366,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasOneDepthButWithoutKey() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 1) (MAXSIZE 1024) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH 1) (MAXSIZE 1024) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -373,7 +374,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasInfinityDepthButWithoutKey() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (MAXSIZE 1024) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (DEPTH infinity) (MAXSIZE 1024) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);
@@ -381,7 +382,7 @@ public class GetAnnotationCommandParserTest {
 
     @Test(expected = DecodingException.class)
     public void decodeMessageShouldThrowExceptionWhenCommandHasDepthOptionInWrongPlace() throws DecodingException {
-        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (DEPTH infinity) \n").getBytes(Charsets.US_ASCII));
+        InputStream inputStream = new ByteArrayInputStream((INBOX + " (/shared/comment /private/comment) (DEPTH infinity) \n").getBytes(StandardCharsets.US_ASCII));
         ImapRequestStreamLineReader lineReader = new ImapRequestStreamLineReader(inputStream, outputStream);
 
         parser.decode(command, lineReader, TAG, session);

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/AllButStartTlsDelimiterChannelHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/AllButStartTlsDelimiterChannelHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/AllButStartTlsDelimiterChannelHandler.java
index b2439c5..b42f1d3 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/AllButStartTlsDelimiterChannelHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/AllButStartTlsDelimiterChannelHandler.java
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.protocols.smtp;
 
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.Locale;
 
@@ -29,7 +30,6 @@ import org.jboss.netty.channel.ChannelPipeline;
 import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder;
 
 import com.google.common.base.CharMatcher;
-import com.google.common.base.Charsets;
 import com.google.common.base.Splitter;
 
 
@@ -57,7 +57,7 @@ public class AllButStartTlsDelimiterChannelHandler extends DelimiterBasedFrameDe
     }
 
     private String readAll(ChannelBuffer buffer) {
-        return buffer.toString(Charsets.US_ASCII);
+        return buffer.toString(StandardCharsets.US_ASCII);
     }
 
     private boolean hasCommandInjection(String trimedLowerCasedInput) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
index e92676b..ad774b1 100644
--- a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
+++ b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.InetSocketAddress;
 import java.net.SocketException;
+import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -55,7 +56,6 @@ import org.apache.james.protocols.smtp.utils.TestMessageHook;
 import org.apache.james.util.concurrency.ConcurrentTestRunner;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.google.common.io.CharStreams;
 
 public abstract class AbstractSMTPServerTest {
@@ -102,7 +102,7 @@ public abstract class AbstractSMTPServerTest {
 
             final ProtocolServer finalServer = server;
             final InetSocketAddress bindedAddress = new ProtocolServerUtils(server).retrieveBindedAddress();
-            final String mailContent = CharStreams.toString(new InputStreamReader(ClassLoader.getSystemResourceAsStream("a50.eml"), Charsets.US_ASCII));
+            final String mailContent = CharStreams.toString(new InputStreamReader(ClassLoader.getSystemResourceAsStream("a50.eml"), StandardCharsets.US_ASCII));
             int threadCount = 4;
             int updateCount = 1;
             assertThat(new ConcurrentTestRunner(threadCount, updateCount,

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCapture.java
----------------------------------------------------------------------
diff --git a/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCapture.java b/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCapture.java
index 20fef6a..068286e 100644
--- a/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCapture.java
+++ b/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCapture.java
@@ -21,8 +21,7 @@ package org.apache.james.cli.util;
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
-
-import com.google.common.base.Charsets;
+import java.nio.charset.StandardCharsets;
 
 public class OutputCapture {
 
@@ -33,7 +32,7 @@ public class OutputCapture {
     }
 
     public String getContent() {
-        return new String(byteArrayOutputStream.toByteArray(), Charsets.UTF_8);
+        return new String(byteArrayOutputStream.toByteArray(), StandardCharsets.UTF_8);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCaptureTest.java
----------------------------------------------------------------------
diff --git a/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCaptureTest.java b/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCaptureTest.java
index a76c2fb..24ca692 100644
--- a/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCaptureTest.java
+++ b/server/container/cli-integration/src/test/java/org/apache/james/cli/util/OutputCaptureTest.java
@@ -21,9 +21,9 @@ package org.apache.james.cli.util;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
-import org.junit.Test;
+import java.nio.charset.StandardCharsets;
 
-import com.google.common.base.Charsets;
+import org.junit.Test;
 
 public class OutputCaptureTest {
 
@@ -37,7 +37,7 @@ public class OutputCaptureTest {
         OutputCapture outputCapture = new OutputCapture();
 
         String message = "Hello world!\n";
-        outputCapture.getPrintStream().write(message.getBytes(Charsets.UTF_8));
+        outputCapture.getPrintStream().write(message.getBytes(StandardCharsets.UTF_8));
 
         assertThat(outputCapture.getContent()).isEqualTo(message);
     }
@@ -47,11 +47,11 @@ public class OutputCaptureTest {
     public void mixingReadsAndWritesShouldWork() throws Exception {
         OutputCapture outputCapture = new OutputCapture();
         String message = "Hello world!\n";
-        outputCapture.getPrintStream().write(message.getBytes(Charsets.UTF_8));
+        outputCapture.getPrintStream().write(message.getBytes(StandardCharsets.UTF_8));
         outputCapture.getContent();
 
         String additionalMessage = "Additional message!\n";
-        outputCapture.getPrintStream().write(additionalMessage.getBytes(Charsets.UTF_8));
+        outputCapture.getPrintStream().write(additionalMessage.getBytes(StandardCharsets.UTF_8));
 
         assertThat(outputCapture.getContent()).isEqualTo(message + additionalMessage);
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/guice/cassandra-guice/src/test/java/org/apache/james/ESReporterTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/ESReporterTest.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/ESReporterTest.java
index 2e46abf..03eb38b 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/ESReporterTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/ESReporterTest.java
@@ -24,6 +24,7 @@ import static com.jayway.restassured.config.EncoderConfig.encoderConfig;
 import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 
 import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
 import java.util.Timer;
 import java.util.TimerTask;
@@ -45,7 +46,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Duration;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
@@ -84,7 +84,7 @@ public class ESReporterTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
                 .setContentType(ContentType.JSON)
                 .setAccept(ContentType.JSON)
-                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
                 .setPort(server.getProbe(JmapGuiceProbe.class).getJmapPort())
                 .build();
         accessToken = HttpJmapAuthentication.authenticateJamesUser(baseUri(), USERNAME, PASSWORD);
@@ -97,7 +97,7 @@ public class ESReporterTest {
             .setScheme("http")
             .setHost("localhost")
             .setPort(server.getProbe(JmapGuiceProbe.class).getJmapPort())
-            .setCharset(Charsets.UTF_8);
+            .setCharset(StandardCharsets.UTF_8);
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
index 29adf98..3f68373 100644
--- a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
+++ b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
@@ -20,6 +20,7 @@ package org.apache.james.jmap;
 
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Optional;
@@ -52,7 +53,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Charsets;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
@@ -128,7 +128,7 @@ public class JMAPModule extends AbstractModule {
     }
 
     private Optional<String> loadPublicKey(FileSystem fileSystem, Optional<String> jwtPublickeyPemUrl) {
-        return jwtPublickeyPemUrl.map(Throwing.function(url -> FileUtils.readFileToString(fileSystem.getFile(url), Charsets.US_ASCII)));
+        return jwtPublickeyPemUrl.map(Throwing.function(url -> FileUtils.readFileToString(fileSystem.getFile(url), StandardCharsets.US_ASCII)));
     }
 
     @Singleton

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/guice/protocols/jmap/src/test/java/org/apache/james/AbstractJmapJamesServerTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/jmap/src/test/java/org/apache/james/AbstractJmapJamesServerTest.java b/server/container/guice/protocols/jmap/src/test/java/org/apache/james/AbstractJmapJamesServerTest.java
index 46a4394..1b1bcb7 100644
--- a/server/container/guice/protocols/jmap/src/test/java/org/apache/james/AbstractJmapJamesServerTest.java
+++ b/server/container/guice/protocols/jmap/src/test/java/org/apache/james/AbstractJmapJamesServerTest.java
@@ -29,6 +29,7 @@ import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.JmapGuiceProbe;
@@ -36,7 +37,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
@@ -63,7 +63,7 @@ public abstract class AbstractJmapJamesServerTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
             .setContentType(ContentType.JSON)
             .setAccept(ContentType.JSON)
-            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(server.getProbe(JmapGuiceProbe.class).getJmapPort())
             .build();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
----------------------------------------------------------------------
diff --git a/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java b/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
index 7fc5e45..6cba668 100644
--- a/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
+++ b/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/MailboxManagementTest.java
@@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.Iterator;
 
 import org.apache.commons.io.IOUtils;
@@ -43,8 +44,6 @@ import org.apache.james.mailbox.store.mail.model.impl.SimpleMailbox;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
-
 public class MailboxManagementTest {
 
     public static final String USER = "user";
@@ -257,8 +256,8 @@ public class MailboxManagementTest {
                 MessageRange.all(), MessageMapper.FetchType.Full, LIMIT);
         MailboxMessage mailboxMessage = iterator.next();
 
-        assertThat(IOUtils.toString(new FileInputStream(new File(emlpath)), Charsets.UTF_8))
-                .isEqualTo(IOUtils.toString(mailboxMessage.getFullContent(), Charsets.UTF_8));
+        assertThat(IOUtils.toString(new FileInputStream(new File(emlpath)), StandardCharsets.UTF_8))
+                .isEqualTo(IOUtils.toString(mailboxMessage.getFullContent(), StandardCharsets.UTF_8));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/container/util-java8/src/test/java/org/apache/james/util/mime/MessageContentExtractorTest.java
----------------------------------------------------------------------
diff --git a/server/container/util-java8/src/test/java/org/apache/james/util/mime/MessageContentExtractorTest.java b/server/container/util-java8/src/test/java/org/apache/james/util/mime/MessageContentExtractorTest.java
index 21c4320..7f4a620 100644
--- a/server/container/util-java8/src/test/java/org/apache/james/util/mime/MessageContentExtractorTest.java
+++ b/server/container/util-java8/src/test/java/org/apache/james/util/mime/MessageContentExtractorTest.java
@@ -22,6 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import java.io.IOException;
 import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
 import java.util.Optional;
 
 import javax.mail.internet.MimeMessage;
@@ -40,8 +41,6 @@ import org.apache.james.util.mime.MessageContentExtractor.MessageContent;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
-
 public class MessageContentExtractorTest {
     private static final String BINARY_CONTENT = "binary";
     private static final String TEXT_CONTENT = "text content";
@@ -78,14 +77,14 @@ public class MessageContentExtractorTest {
     @Before
     public void setup() throws IOException {
         testee = new MessageContentExtractor();
-        textPart = BodyPartBuilder.create().setBody(TEXT_CONTENT, "plain", Charsets.UTF_8).build();
-        htmlPart = BodyPartBuilder.create().setBody(HTML_CONTENT, "html", Charsets.UTF_8).build();
+        textPart = BodyPartBuilder.create().setBody(TEXT_CONTENT, "plain", StandardCharsets.UTF_8).build();
+        htmlPart = BodyPartBuilder.create().setBody(HTML_CONTENT, "html", StandardCharsets.UTF_8).build();
         textAttachment = BodyPartBuilder.create()
-                .setBody(ATTACHMENT_CONTENT, "plain", Charsets.UTF_8)
+                .setBody(ATTACHMENT_CONTENT, "plain", StandardCharsets.UTF_8)
                 .setContentDisposition("attachment")
                 .build();
         inlineText = BodyPartBuilder.create()
-                .setBody(ATTACHMENT_CONTENT, "plain", Charsets.UTF_8)
+                .setBody(ATTACHMENT_CONTENT, "plain", StandardCharsets.UTF_8)
                 .setContentDisposition("inline")
                 .build();
         inlineImage = BodyPartBuilder.create()
@@ -97,7 +96,7 @@ public class MessageContentExtractorTest {
     @Test
     public void extractShouldReturnEmptyWhenBinaryContentOnly() throws IOException {
         Message message = Message.Builder.of()
-                .setBody(BasicBodyFactory.INSTANCE.binaryBody(BINARY_CONTENT, Charsets.UTF_8))
+                .setBody(BasicBodyFactory.INSTANCE.binaryBody(BINARY_CONTENT, StandardCharsets.UTF_8))
                 .build();
         MessageContent actual = testee.extract(message);
         assertThat(actual.getTextBody()).isEmpty();
@@ -107,7 +106,7 @@ public class MessageContentExtractorTest {
     @Test
     public void extractShouldReturnTextOnlyWhenTextOnlyBody() throws IOException {
         Message message = Message.Builder.of()
-                .setBody(TEXT_CONTENT, Charsets.UTF_8)
+                .setBody(TEXT_CONTENT, StandardCharsets.UTF_8)
                 .build();
         MessageContent actual = testee.extract(message);
         assertThat(actual.getTextBody()).contains(TEXT_CONTENT);
@@ -117,7 +116,7 @@ public class MessageContentExtractorTest {
     @Test
     public void extractShouldReturnHtmlOnlyWhenHtmlOnlyBody() throws IOException {
         Message message = Message.Builder.of()
-                .setBody(HTML_CONTENT, "html", Charsets.UTF_8)
+                .setBody(HTML_CONTENT, "html", StandardCharsets.UTF_8)
                 .build();
         MessageContent actual = testee.extract(message);
         assertThat(actual.getTextBody()).isEmpty();
@@ -184,11 +183,11 @@ public class MessageContentExtractorTest {
         String textBody = "body 1";
         Multipart multipart = MultipartBuilder.create("report")
             .addBodyPart(BodyPartBuilder.create()
-                .setBody(textBody, "plain", Charsets.UTF_8)
+                .setBody(textBody, "plain", StandardCharsets.UTF_8)
                 .setContentDisposition("inline")
                 .build())
             .addBodyPart(BodyPartBuilder.create()
-                .setBody("body 2", "rfc822-headers", Charsets.UTF_8)
+                .setBody("body 2", "rfc822-headers", StandardCharsets.UTF_8)
                 .setContentDisposition("inline")
                 .build())
             .build();
@@ -281,7 +280,7 @@ public class MessageContentExtractorTest {
     public void extractShouldRetrieveHtmlBodyWithOneInlinedHTMLAttachmentWithoutCid() throws IOException {
         //Given
         BodyPart inlinedHTMLPart = BodyPartBuilder.create()
-            .setBody(HTML_CONTENT, "html", Charsets.UTF_8)
+            .setBody(HTML_CONTENT, "html", StandardCharsets.UTF_8)
             .build();
         HeaderImpl inlinedHeader = new HeaderImpl();
         inlinedHeader.addField(Fields.contentDisposition(MimeMessage.INLINE));
@@ -305,7 +304,7 @@ public class MessageContentExtractorTest {
     public void extractShouldNotRetrieveHtmlBodyWithOneInlinedHTMLAttachmentWithCid() throws IOException {
         //Given
         BodyPart inlinedHTMLPart = BodyPartBuilder.create()
-            .setBody(HTML_CONTENT, "html", Charsets.UTF_8)
+            .setBody(HTML_CONTENT, "html", StandardCharsets.UTF_8)
             .build();
         HeaderImpl inlinedHeader = new HeaderImpl();
         inlinedHeader.addField(Fields.contentDisposition(MimeMessage.INLINE));
@@ -331,7 +330,7 @@ public class MessageContentExtractorTest {
     public void extractShouldRetrieveTextBodyWithOneInlinedTextAttachmentWithoutCid() throws IOException {
         //Given
         BodyPart inlinedTextPart = BodyPartBuilder.create()
-            .setBody(TEXT_CONTENT, "text", Charsets.UTF_8)
+            .setBody(TEXT_CONTENT, "text", StandardCharsets.UTF_8)
             .build();
         HeaderImpl inlinedHeader = new HeaderImpl();
         inlinedHeader.addField(Fields.contentDisposition(MimeMessage.INLINE));
@@ -355,7 +354,7 @@ public class MessageContentExtractorTest {
     public void extractShouldNotRetrieveTextBodyWithOneInlinedTextAttachmentWithCid() throws IOException {
         //Given
         BodyPart inlinedTextPart = BodyPartBuilder.create()
-            .setBody(TEXT_CONTENT, "text", Charsets.UTF_8)
+            .setBody(TEXT_CONTENT, "text", StandardCharsets.UTF_8)
             .build();
         HeaderImpl inlinedHeader = new HeaderImpl();
         inlinedHeader.addField(Fields.contentDisposition(MimeMessage.INLINE));
@@ -502,7 +501,7 @@ public class MessageContentExtractorTest {
     public void extractShouldRespectCharsetWhenUTF8() throws IOException {
         String text = "éééé\r\nèèèè\r\nàààà";
         Message message = Message.Builder.of()
-                .setBody(text, Charsets.UTF_8)
+                .setBody(text, StandardCharsets.UTF_8)
                 .build();
         MessageContent actual = testee.extract(message);
         assertThat(actual.getTextBody()).contains(text);

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/data/data-cassandra/src/main/java/org/apache/james/sieve/cassandra/model/Script.java
----------------------------------------------------------------------
diff --git a/server/data/data-cassandra/src/main/java/org/apache/james/sieve/cassandra/model/Script.java b/server/data/data-cassandra/src/main/java/org/apache/james/sieve/cassandra/model/Script.java
index fd2f38c..8424a41 100644
--- a/server/data/data-cassandra/src/main/java/org/apache/james/sieve/cassandra/model/Script.java
+++ b/server/data/data-cassandra/src/main/java/org/apache/james/sieve/cassandra/model/Script.java
@@ -2,12 +2,12 @@
 
 package org.apache.james.sieve.cassandra.model;
 
+import java.nio.charset.StandardCharsets;
 import java.util.Objects;
 import java.util.Optional;
 
 import org.apache.james.sieverepository.api.ScriptSummary;
 
-import com.google.common.base.Charsets;
 import com.google.common.base.Preconditions;
 
 public class Script {
@@ -58,7 +58,7 @@ public class Script {
             return new Script(name,
                 content,
                 isActive.get(),
-                size.orElse((long) content.getBytes(Charsets.UTF_8).length));
+                size.orElse((long) content.getBytes(StandardCharsets.UTF_8).length));
         }
 
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/model/ScriptTest.java
----------------------------------------------------------------------
diff --git a/server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/model/ScriptTest.java b/server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/model/ScriptTest.java
index bea5812..95af5ce 100644
--- a/server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/model/ScriptTest.java
+++ b/server/data/data-cassandra/src/test/java/org/apache/james/sieve/cassandra/model/ScriptTest.java
@@ -21,13 +21,13 @@ package org.apache.james.sieve.cassandra.model;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.james.sieverepository.api.ScriptSummary;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-import com.google.common.base.Charsets;
-
 import nl.jqno.equalsverifier.EqualsVerifier;
 
 public class ScriptTest {
@@ -130,7 +130,7 @@ public class ScriptTest {
                 .isActive(true)
                 .build()
                 .getSize())
-            .isEqualTo(content.getBytes(Charsets.UTF_8).length);
+            .isEqualTo(content.getBytes(StandardCharsets.UTF_8).length);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
index 4bde906..abdac8b 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
@@ -28,6 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
 import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.james.dnsservice.api.DNSService;
@@ -60,7 +61,6 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -111,7 +111,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
             .setContentType(ContentType.JSON)
             .setAccept(ContentType.JSON)
-            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(80)
             .setBaseUri("http://" + fakeSmtp.getContainerIp())
             .build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
index 726c6df..3222dac 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
@@ -25,6 +25,8 @@ import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.nio.charset.StandardCharsets;
+
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
@@ -52,7 +54,6 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -100,7 +101,7 @@ public class SmtpAuthorizedAddressesTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
             .setContentType(ContentType.JSON)
             .setAccept(ContentType.JSON)
-            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(80)
             .setBaseUri("http://" + fakeSmtp.getContainerIp())
             .build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
index 493d8f8..294c4e8 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
@@ -21,6 +21,8 @@ package org.apache.james.transport.mailets;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.nio.charset.StandardCharsets;
+
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.core.MailAddress;
@@ -51,7 +53,6 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -72,7 +73,7 @@ public class AmqpForwardAttachmentTest {
     private static final String EXCHANGE_NAME = "myExchange";
     private static final String ROUTING_KEY = "myRoutingKey";
     
-    private static final byte[] TEST_ATTACHMENT_CONTENT = "Test attachment content".getBytes(Charsets.UTF_8);
+    private static final byte[] TEST_ATTACHMENT_CONTENT = "Test attachment content".getBytes(StandardCharsets.UTF_8);
 
     public SwarmGenericContainer rabbitMqContainer = new SwarmGenericContainer(Images.RABBITMQ)
             .withAffinityToContainer();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
index b12595d..cc9c98d 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
@@ -21,6 +21,7 @@ package org.apache.james.transport.mailets;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.nio.charset.StandardCharsets;
 import java.util.Optional;
 
 import javax.mail.internet.MimeMessage;
@@ -54,7 +55,6 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableList;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
@@ -547,7 +547,7 @@ public class ICSAttachmentWorkflowTest {
                     .data("simple text")
                     .build(),
                 MimeMessageBuilder.bodyPartBuilder()
-                    .data(ICS_1.getBytes(Charsets.UTF_8))
+                    .data(ICS_1.getBytes(StandardCharsets.UTF_8))
                     .filename("meeting.ics")
                     .disposition("attachment")
                     .build())
@@ -559,7 +559,7 @@ public class ICSAttachmentWorkflowTest {
                 MimeMessageBuilder.bodyPartBuilder()
                     .data("simple text")
                     .build(),
-                MimeMessageBuilder.bodyPartFromBytes(ICS_BASE64.getBytes(Charsets.UTF_8)))
+                MimeMessageBuilder.bodyPartFromBytes(ICS_BASE64.getBytes(StandardCharsets.UTF_8)))
             .setSubject("test")
             .build();
 
@@ -571,17 +571,17 @@ public class ICSAttachmentWorkflowTest {
                     .data("simple text")
                     .build(),
                 MimeMessageBuilder.bodyPartBuilder()
-                    .data(ICS_1.getBytes(Charsets.UTF_8))
+                    .data(ICS_1.getBytes(StandardCharsets.UTF_8))
                     .filename("test1.txt")
                     .disposition("attachment")
                     .build(),
                 MimeMessageBuilder.bodyPartBuilder()
-                    .data(ICS_2.getBytes(Charsets.UTF_8))
+                    .data(ICS_2.getBytes(StandardCharsets.UTF_8))
                     .filename("test2.txt")
                     .disposition("attachment")
                     .build(),
                 MimeMessageBuilder.bodyPartBuilder()
-                    .data(ICS_3.getBytes(Charsets.UTF_8))
+                    .data(ICS_3.getBytes(StandardCharsets.UTF_8))
                     .filename("test3.txt")
                     .disposition("attachment")
                     .build())

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
index 3182103..eb744e4 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
@@ -20,6 +20,7 @@
 package org.apache.james.transport.mailets.amqp;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.Optional;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
@@ -27,7 +28,6 @@ import java.util.concurrent.TimeoutException;
 import org.apache.james.util.docker.SwarmGenericContainer;
 import org.junit.rules.ExternalResource;
 
-import com.google.common.base.Charsets;
 import com.google.common.base.Throwables;
 import com.jayway.awaitility.Awaitility;
 import com.rabbitmq.client.BuiltinExchangeType;
@@ -71,7 +71,7 @@ public class AmqpRule extends ExternalResource {
 
     public Optional<String> readContent() throws IOException {
         return readContentAsBytes()
-            .map(value -> new String(value, Charsets.UTF_8));
+            .map(value -> new String(value, StandardCharsets.UTF_8));
     }
 
     public Optional<byte[]> readContentAsBytes() throws IOException {

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/MailDispatcherTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/MailDispatcherTest.java b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/MailDispatcherTest.java
index 19932f3..547ae9b 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/MailDispatcherTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/MailDispatcherTest.java
@@ -26,6 +26,7 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 
+import java.nio.charset.StandardCharsets;
 import java.util.Collection;
 import java.util.List;
 
@@ -45,7 +46,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 
-import com.google.common.base.Charsets;
 import com.google.common.collect.ArrayListMultimap;
 
 public class MailDispatcherTest {
@@ -155,7 +155,7 @@ public class MailDispatcherTest {
             .fromMailet()
             .state(Mail.ERROR).build();
         assertThat(actual).containsOnly(expected);
-        assertThat(IOUtils.toString(actual.get(0).getMsg().getInputStream(), Charsets.UTF_8))
+        assertThat(IOUtils.toString(actual.get(0).getMsg().getInputStream(), StandardCharsets.UTF_8))
             .contains("toto");
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java
index 7095a4c..516be1c 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/managesieve/ManageSieveMailetTestCase.java
@@ -27,6 +27,7 @@ import static org.mockito.Mockito.when;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 
 import javax.mail.MessagingException;
 import javax.mail.internet.InternetAddress;
@@ -51,7 +52,6 @@ import org.apache.mailet.base.test.MimeMessageBuilder;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.google.common.collect.Lists;
 
 public class ManageSieveMailetTestCase {
@@ -518,7 +518,7 @@ public class ManageSieveMailetTestCase {
             if (multipart.getBodyPart(i).getContent() instanceof String) {
                 assertThat(((String) multipart.getBodyPart(i).getContent()).trim()).isEqualTo(contents[i]);
             } else {
-                assertThat(IOUtils.toString((ByteArrayInputStream) multipart.getBodyPart(i).getContent(), Charsets.UTF_8).trim()).isEqualTo(contents[i]);
+                assertThat(IOUtils.toString((ByteArrayInputStream) multipart.getBodyPart(i).getContent(), StandardCharsets.UTF_8).trim()).isEqualTo(contents[i]);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/JMAPAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/JMAPAuthenticationTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/JMAPAuthenticationTest.java
index 42da7fe..1317521 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/JMAPAuthenticationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/JMAPAuthenticationTest.java
@@ -28,6 +28,7 @@ import static org.hamcrest.Matchers.hasItem;
 import static org.hamcrest.Matchers.isA;
 import static org.hamcrest.Matchers.notNullValue;
 
+import java.nio.charset.StandardCharsets;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.UUID;
@@ -40,7 +41,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
@@ -64,7 +64,7 @@ public abstract class JMAPAuthenticationTest {
         jmapServer = createJmapServer(zonedDateTimeProvider);
         jmapServer.start();
         RestAssured.requestSpecification = new RequestSpecBuilder()
-        		.setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+        		.setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
         		.setPort(jmapServer.getProbe(JmapGuiceProbe.class).getJmapPort())
         		.build();
         

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/UserProvisionningConcurrencyTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/UserProvisionningConcurrencyTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/UserProvisionningConcurrencyTest.java
index 7f28e41..17e10ef 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/UserProvisionningConcurrencyTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/UserProvisionningConcurrencyTest.java
@@ -28,6 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasItems;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.nio.charset.StandardCharsets;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.http.client.utils.URIBuilder;
@@ -39,7 +40,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
 
@@ -58,7 +58,7 @@ public abstract class UserProvisionningConcurrencyTest {
         jmapServer = createJmapServer();
         jmapServer.start();
         RestAssured.requestSpecification = new RequestSpecBuilder()
-            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(jmapServer.getProbe(JmapGuiceProbe.class).getJmapPort())
             .build();
 
@@ -104,6 +104,6 @@ public abstract class UserProvisionningConcurrencyTest {
             .setScheme("http")
             .setHost("localhost")
             .setPort(jmapServer.getProbe(JmapGuiceProbe.class).getJmapPort())
-            .setCharset(Charsets.UTF_8);
+            .setCharset(StandardCharsets.UTF_8);
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationIntegrationTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationIntegrationTest.java
index de160b9..4c7ba30 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationIntegrationTest.java
@@ -27,6 +27,7 @@ import static org.hamcrest.Matchers.empty;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasSize;
 
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
@@ -46,7 +47,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -98,7 +98,7 @@ public abstract class VacationIntegrationTest {
             .setAccept(ContentType.JSON)
             .setConfig(newConfig()
                 .encoderConfig(
-                    encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+                    encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(jmapGuiceProbe
                 .getJmapPort())
             .build();
@@ -117,7 +117,7 @@ public abstract class VacationIntegrationTest {
             .setHost("localhost")
             .setPort(guiceJamesServer.getProbe(JmapGuiceProbe.class)
                 .getJmapPort())
-            .setCharset(Charsets.UTF_8);
+            .setCharset(StandardCharsets.UTF_8);
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
index 0291569..da9baa9 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/VacationRelayIntegrationTest.java
@@ -25,6 +25,7 @@ import static com.jayway.restassured.config.RestAssuredConfig.newConfig;
 import static org.hamcrest.Matchers.equalTo;
 
 import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.net.smtp.SMTPClient;
@@ -46,7 +47,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.testcontainers.containers.wait.HostPortWaitStrategy;
 
-import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
@@ -105,7 +105,7 @@ public abstract class VacationRelayIntegrationTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
             .setContentType(ContentType.JSON)
             .setAccept(ContentType.JSON)
-            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+            .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
             .setPort(80)
             .setBaseUri("http://" + containerIp.getHostAddress())
             .build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMailboxesMethodTest.java
index ffc7e89..367a2ae 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMailboxesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMailboxesMethodTest.java
@@ -35,6 +35,7 @@ import static org.hamcrest.Matchers.not;
 import static org.hamcrest.Matchers.nullValue;
 
 import java.io.ByteArrayInputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.Date;
 import java.util.List;
 import java.util.Locale;
@@ -65,7 +66,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.jayway.restassured.RestAssured;
@@ -102,7 +102,7 @@ public abstract class GetMailboxesMethodTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
                 .setContentType(ContentType.JSON)
                 .setAccept(ContentType.JSON)
-                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
                 .setPort(jmapServer.getProbe(JmapGuiceProbe.class).getJmapPort())
                 .build();
         RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
@@ -125,7 +125,7 @@ public abstract class GetMailboxesMethodTest {
             .setHost("localhost")
             .setPort(jmapServer.getProbe(JmapGuiceProbe.class)
                 .getJmapPort())
-            .setCharset(Charsets.UTF_8);
+            .setCharset(StandardCharsets.UTF_8);
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/ba1dd277/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMessageListMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMessageListMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMessageListMethodTest.java
index 0885fd4..7b8a0e7 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMessageListMethodTest.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/GetMessageListMethodTest.java
@@ -32,6 +32,7 @@ import static org.hamcrest.Matchers.not;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.util.Date;
@@ -68,7 +69,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Charsets;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
@@ -104,7 +104,7 @@ public abstract class GetMessageListMethodTest {
         RestAssured.requestSpecification = new RequestSpecBuilder()
                 .setContentType(ContentType.JSON)
                 .setAccept(ContentType.JSON)
-                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(Charsets.UTF_8)))
+                .setConfig(newConfig().encoderConfig(encoderConfig().defaultContentCharset(StandardCharsets.UTF_8)))
                 .setPort(jmapServer.getProbe(JmapGuiceProbe.class).getJmapPort())
                 .build();
 
@@ -128,7 +128,7 @@ public abstract class GetMessageListMethodTest {
             .setHost("localhost")
             .setPort(jmapServer.getProbe(JmapGuiceProbe.class)
                 .getJmapPort())
-            .setCharset(Charsets.UTF_8);
+            .setCharset(StandardCharsets.UTF_8);
     }
 
     @After
@@ -1012,7 +1012,7 @@ public abstract class GetMessageListMethodTest {
                 .setBody(attachmentContent, "application/pdf")
                 .setContentDisposition("attachment")
                 .build();
-        BodyPart textPart = BodyPartBuilder.create().setBody("The message has a PDF attachment.", "plain", Charsets.UTF_8).build();
+        BodyPart textPart = BodyPartBuilder.create().setBody("The message has a PDF attachment.", "plain", StandardCharsets.UTF_8).build();
         Multipart multipart = MultipartBuilder.create("mixed")
                 .addBodyPart(attachment)
                 .addBodyPart(textPart)
@@ -1045,7 +1045,7 @@ public abstract class GetMessageListMethodTest {
                 .setBody(attachmentContent, "application/pdf")
                 .setContentDisposition("attachment")
                 .build();
-        BodyPart textPart = BodyPartBuilder.create().setBody("The message has a PDF attachment.", "plain", Charsets.UTF_8).build();
+        BodyPart textPart = BodyPartBuilder.create().setBody("The message has a PDF attachment.", "plain", StandardCharsets.UTF_8).build();
         Multipart multipart = MultipartBuilder.create("mixed")
                 .addBodyPart(attachment)
                 .addBodyPart(textPart)


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