james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [8/8] james-project git commit: Fix Eclipse warnings
Date Fri, 02 Jun 2017 12:02:23 GMT
Fix Eclipse warnings


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/a34bc332
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/a34bc332
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/a34bc332

Branch: refs/heads/master
Commit: a34bc332e82239665918e16bbaded2382260c097
Parents: c74138c
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Wed May 31 16:04:52 2017 +0200
Committer: benwa <btellier@linagora.com>
Committed: Fri Jun 2 19:01:47 2017 +0700

----------------------------------------------------------------------
 .../cassandra/mail/CassandraMailboxRecentsDAO.java  |  2 --
 .../cassandra/modules/CassandraAclModule.java       |  1 -
 .../modules/CassandraAnnotationModule.java          |  1 -
 .../cassandra/modules/CassandraMessageModule.java   |  2 --
 .../modules/CassandraSubscriptionModule.java        |  1 -
 .../org/apache/james/mpt/smtp/ForwardSmtpTest.java  |  1 -
 .../org/apache/james/utils/RetryExecutorUtil.java   |  4 +++-
 .../util/mime/MessageContentExtractorTest.java      |  1 -
 .../james/util/streams/SwarmGenericContainer.java   |  9 +++++----
 .../domainlist/lib/AbstractDomainListTest.java      |  3 +--
 server/dns-service/dnsservice-api/pom.xml           |  1 -
 .../transport/mailets/delivery/SimpleMailStore.java |  1 -
 .../mailets/delivery/MailDispatcherTest.java        |  1 -
 .../mailets/delivery/SimpleMailStoreTest.java       |  1 -
 .../cassandra-jmap-integration-testing/pom.xml      |  1 -
 .../jmap-integration-testing-common/pom.xml         |  1 -
 .../james/jmap/VacationRelayIntegrationTest.java    |  5 ++---
 .../memory-jmap-integration-testing/pom.xml         |  1 -
 .../apache/james/jmap/json/ObjectMapperFactory.java |  2 --
 .../james/jmap/methods/MIMEMessageConverter.java    | 16 ++++++----------
 .../james/jmap/send/PostDequeueDecoratorTest.java   |  5 +++--
 21 files changed, 20 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxRecentsDAO.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxRecentsDAO.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxRecentsDAO.java
index 48a6a9c..f4eddf9 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxRecentsDAO.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxRecentsDAO.java
@@ -25,7 +25,6 @@ import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.insertInto;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
 
-import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.stream.Stream;
 
@@ -40,7 +39,6 @@ import org.apache.james.mailbox.cassandra.table.CassandraMailboxRecentsTable;
 import com.datastax.driver.core.BoundStatement;
 import com.datastax.driver.core.PreparedStatement;
 import com.datastax.driver.core.Session;
-import com.github.steveash.guavate.Guavate;
 
 public class CassandraMailboxRecentsDAO {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAclModule.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAclModule.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAclModule.java
index dd0d757..55ca04e 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAclModule.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAclModule.java
@@ -23,7 +23,6 @@ import static com.datastax.driver.core.DataType.bigint;
 import static com.datastax.driver.core.DataType.text;
 import static com.datastax.driver.core.DataType.timeuuid;
 
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.james.backends.cassandra.components.CassandraModule;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAnnotationModule.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAnnotationModule.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAnnotationModule.java
index dbab40e..a1e049d 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAnnotationModule.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraAnnotationModule.java
@@ -22,7 +22,6 @@ package org.apache.james.mailbox.cassandra.modules;
 import static com.datastax.driver.core.DataType.text;
 import static com.datastax.driver.core.DataType.timeuuid;
 
-import java.util.Collections;
 import java.util.List;
 
 import org.apache.james.backends.cassandra.components.CassandraModule;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMessageModule.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMessageModule.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMessageModule.java
index aa45f52..9e84008 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMessageModule.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMessageModule.java
@@ -33,7 +33,6 @@ import java.util.List;
 import org.apache.james.backends.cassandra.components.CassandraModule;
 import org.apache.james.backends.cassandra.components.CassandraTable;
 import org.apache.james.backends.cassandra.components.CassandraType;
-import org.apache.james.backends.cassandra.utils.CassandraConstants;
 import org.apache.james.mailbox.cassandra.table.CassandraMessageIdTable;
 import org.apache.james.mailbox.cassandra.table.CassandraMessageIds;
 import org.apache.james.mailbox.cassandra.table.CassandraMessageTable;
@@ -41,7 +40,6 @@ import org.apache.james.mailbox.cassandra.table.Flag;
 import org.apache.james.mailbox.cassandra.table.MessageIdToImapUid;
 
 import com.datastax.driver.core.schemabuilder.SchemaBuilder;
-import com.datastax.driver.core.schemabuilder.TableOptions;
 import com.google.common.collect.ImmutableList;
 
 public class CassandraMessageModule implements CassandraModule {

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraSubscriptionModule.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraSubscriptionModule.java
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraSubscriptionModule.java
index 8ec73fc..e29c8b5 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraSubscriptionModule.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraSubscriptionModule.java
@@ -26,7 +26,6 @@ import java.util.List;
 import org.apache.james.backends.cassandra.components.CassandraModule;
 import org.apache.james.backends.cassandra.components.CassandraTable;
 import org.apache.james.backends.cassandra.components.CassandraType;
-import org.apache.james.backends.cassandra.utils.CassandraConstants;
 import org.apache.james.mailbox.cassandra.table.CassandraSubscriptionTable;
 
 import com.datastax.driver.core.schemabuilder.SchemaBuilder;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/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 06b632f..cb8ca5f 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
@@ -37,7 +37,6 @@ import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
 import com.google.common.base.Charsets;
-import com.google.common.collect.ImmutableList;
 import com.google.common.net.InetAddresses;
 import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/container/guice/guice-common/src/main/java/org/apache/james/utils/RetryExecutorUtil.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/RetryExecutorUtil.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/RetryExecutorUtil.java
index c98ccdb..b4b218f 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/RetryExecutorUtil.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/RetryExecutorUtil.java
@@ -19,16 +19,18 @@
 
 package org.apache.james.utils;
 
-import com.nurkiewicz.asyncretry.AsyncRetryExecutor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.nurkiewicz.asyncretry.AsyncRetryExecutor;
+
 public class RetryExecutorUtil {
     private static final Logger LOG = LoggerFactory.getLogger(RetryExecutorUtil.class);
 
     private static final int INITIAL_DELAY_MILLIS = 500;
     private static final int MULTIPLIER = 2;
 
+    @SafeVarargs
     public static AsyncRetryExecutor retryOnExceptions(AsyncRetryExecutor executor, int maxRetries,
int minDelay, Class<? extends Throwable>... clazz) {
         LOG.info("The action should retry when {} and retry to {} times if needed", clazz,
maxRetries);
         return executor

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/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 940a0ad..21c4320 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
@@ -34,7 +34,6 @@ import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.BodyPartBuilder;
 import org.apache.james.mime4j.message.HeaderImpl;
 import org.apache.james.mime4j.message.MultipartBuilder;
-import org.apache.james.mime4j.dom.Message;
 import org.apache.james.mime4j.stream.Field;
 import org.apache.james.mime4j.util.ByteSequence;
 import org.apache.james.util.mime.MessageContentExtractor.MessageContent;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/container/util-java8/src/test/java/org/apache/james/util/streams/SwarmGenericContainer.java
----------------------------------------------------------------------
diff --git a/server/container/util-java8/src/test/java/org/apache/james/util/streams/SwarmGenericContainer.java
b/server/container/util-java8/src/test/java/org/apache/james/util/streams/SwarmGenericContainer.java
index fb743a5..4e29371 100644
--- a/server/container/util-java8/src/test/java/org/apache/james/util/streams/SwarmGenericContainer.java
+++ b/server/container/util-java8/src/test/java/org/apache/james/util/streams/SwarmGenericContainer.java
@@ -21,7 +21,6 @@ package org.apache.james.util.streams;
 
 import java.util.List;
 
-import com.google.common.base.Strings;
 import org.junit.Assume;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
@@ -32,17 +31,19 @@ import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.images.builder.ImageFromDockerfile;
 import org.testcontainers.shaded.com.github.dockerjava.api.command.InspectContainerResponse;
 
+import com.google.common.base.Strings;
+
 public class SwarmGenericContainer implements TestRule {
     private static final Logger LOGGER = LoggerFactory.getLogger(SwarmGenericContainer.class);
     private static final String DOCKER_CONTAINER = "DOCKER_CONTAINER";
     private static final String NO_DOCKER_ENVIRONMENT = "Could not find a valid Docker environment.";
     private static final String SKIPPING_TEST_CAUTION = "Skipping all docker tests as no
Docker environment was found";
 
-    private GenericContainer container;
+    private GenericContainer<?> container;
 
     public SwarmGenericContainer(String dockerImageName) {
         try {
-            this.container = new GenericContainer(dockerImageName);
+            this.container = new GenericContainer<>(dockerImageName);
         } catch (IllegalStateException e) {
             logAndCheckSkipTest(e);
         }
@@ -50,7 +51,7 @@ public class SwarmGenericContainer implements TestRule {
 
     public SwarmGenericContainer(ImageFromDockerfile imageFromDockerfile) {
         try {
-            this.container = new GenericContainer(imageFromDockerfile);
+            this.container = new GenericContainer<>(imageFromDockerfile);
         } catch (IllegalStateException e) {
             logAndCheckSkipTest(e);
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/data/data-library/src/test/java/org/apache/james/domainlist/lib/AbstractDomainListTest.java
----------------------------------------------------------------------
diff --git a/server/data/data-library/src/test/java/org/apache/james/domainlist/lib/AbstractDomainListTest.java
b/server/data/data-library/src/test/java/org/apache/james/domainlist/lib/AbstractDomainListTest.java
index 532ac02..511d9c0 100644
--- a/server/data/data-library/src/test/java/org/apache/james/domainlist/lib/AbstractDomainListTest.java
+++ b/server/data/data-library/src/test/java/org/apache/james/domainlist/lib/AbstractDomainListTest.java
@@ -25,7 +25,6 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.Collection;
 
-import com.google.common.collect.ImmutableList;
 import org.apache.james.dnsservice.api.DNSService;
 import org.apache.james.dnsservice.api.mock.MockDNSService;
 import org.apache.james.domainlist.api.DomainList;
@@ -34,7 +33,7 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.management.ImmutableDescriptor;
+import com.google.common.collect.ImmutableList;
 
 public abstract class AbstractDomainListTest {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/dns-service/dnsservice-api/pom.xml
----------------------------------------------------------------------
diff --git a/server/dns-service/dnsservice-api/pom.xml b/server/dns-service/dnsservice-api/pom.xml
index cf7cc91..c40cddc 100644
--- a/server/dns-service/dnsservice-api/pom.xml
+++ b/server/dns-service/dnsservice-api/pom.xml
@@ -42,7 +42,6 @@
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
-            <version>18.0</version>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/SimpleMailStore.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/SimpleMailStore.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/SimpleMailStore.java
index 2d909b9..87a910d 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/SimpleMailStore.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/SimpleMailStore.java
@@ -21,7 +21,6 @@ package org.apache.james.transport.mailets.delivery;
 
 import javax.mail.MessagingException;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.metrics.api.Metric;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/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 d08e00c..c855eff 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
@@ -33,7 +33,6 @@ import javax.mail.MessagingException;
 import javax.mail.internet.MimeMessage;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.PerRecipientHeaders.Header;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/SimpleMailStoreTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/SimpleMailStoreTest.java
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/SimpleMailStoreTest.java
index ae08148..ebf9e9d 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/SimpleMailStoreTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/SimpleMailStoreTest.java
@@ -27,7 +27,6 @@ import static org.mockito.Mockito.when;
 
 import javax.mail.internet.MimeMessage;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.metrics.api.Metric;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml
index 660cb2c..19aa2dc 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml
@@ -199,7 +199,6 @@
                     <groupId>org.apache.james</groupId>
                     <artifactId>james-server-dnsservice-api</artifactId>
                     <type>test-jar</type>
-                    <version>${project.version}</version>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap-integration-testing/jmap-integration-testing-common/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/pom.xml
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/pom.xml
index 18ec7a3..2980125 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/pom.xml
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/pom.xml
@@ -183,7 +183,6 @@
                     <artifactId>james-server-dnsservice-api</artifactId>
                     <type>test-jar</type>
                     <scope>test</scope>
-                    <version>${project.version}</version>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/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 9c27644..3fc48ff 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
@@ -27,8 +27,6 @@ import static org.hamcrest.Matchers.equalTo;
 import java.net.InetAddress;
 import java.util.concurrent.TimeUnit;
 
-import com.jayway.restassured.RestAssured;
-import com.jayway.restassured.specification.RequestSpecification;
 import org.apache.commons.net.smtp.SMTPClient;
 import org.apache.james.GuiceJamesServer;
 import org.apache.james.dnsservice.api.InMemoryDNSService;
@@ -45,14 +43,15 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.testcontainers.shaded.com.google.common.net.InetAddresses;
 
 import com.google.common.base.Charsets;
 import com.jayway.awaitility.Awaitility;
 import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
+import com.jayway.restassured.RestAssured;
 import com.jayway.restassured.builder.RequestSpecBuilder;
 import com.jayway.restassured.http.ContentType;
-import org.testcontainers.shaded.com.google.common.net.InetAddresses;
 
 public abstract class VacationRelayIntegrationTest {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/pom.xml
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/pom.xml
index 4c1c2bf..01f69da 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/pom.xml
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/pom.xml
@@ -186,7 +186,6 @@
                     <groupId>org.apache.james</groupId>
                     <artifactId>james-server-dnsservice-api</artifactId>
                     <type>test-jar</type>
-                    <version>${project.version}</version>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/ObjectMapperFactory.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/ObjectMapperFactory.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/ObjectMapperFactory.java
index 44b8301..71a1b2b 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/ObjectMapperFactory.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/ObjectMapperFactory.java
@@ -21,7 +21,6 @@ package org.apache.james.jmap.json;
 
 import java.io.IOException;
 import java.util.Set;
-import java.util.TimeZone;
 
 import javax.inject.Inject;
 
@@ -54,7 +53,6 @@ public class ObjectMapperFactory {
             new GuavaModule());
 
     private final Set<Module> jacksonModules;
-    private static final TimeZone UTC_TIMEZONE = TimeZone.getTimeZone("UTC");
 
     @Inject
     public ObjectMapperFactory(MailboxId.Factory mailboxIdFactory, MessageId.Factory messageIdFactory)
{

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
index ac03102..4fdecf1 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
@@ -49,7 +49,6 @@ import org.apache.james.mime4j.message.BasicBodyFactory;
 import org.apache.james.mime4j.message.BodyPart;
 import org.apache.james.mime4j.message.BodyPartBuilder;
 import org.apache.james.mime4j.message.DefaultMessageWriter;
-import org.apache.james.mime4j.message.MessageBuilder;
 import org.apache.james.mime4j.message.MultipartBuilder;
 import org.apache.james.mime4j.stream.Field;
 import org.apache.james.mime4j.stream.NameValuePair;
@@ -60,7 +59,6 @@ import org.slf4j.LoggerFactory;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Splitter;
 import com.google.common.base.Throwables;
-import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
@@ -103,7 +101,7 @@ public class MIMEMessageConverter {
             throw new IllegalArgumentException("creationMessageEntry is either null or has
null message");
         }
 
-        MessageBuilder messageBuilder = MessageBuilder.create();
+        Message.Builder messageBuilder = Message.Builder.of();
         if (isMultipart(creationMessageEntry.getValue(), messageAttachments)) {
             messageBuilder.setBody(createMultipart(creationMessageEntry.getValue(), messageAttachments));
         } else {
@@ -114,7 +112,7 @@ public class MIMEMessageConverter {
         return messageBuilder.build();
     }
 
-    private void buildMimeHeaders(MessageBuilder messageBuilder, CreationMessageId creationId,
CreationMessage newMessage, ImmutableList<MessageAttachment> messageAttachments) {
+    private void buildMimeHeaders(Message.Builder messageBuilder, CreationMessageId creationId,
CreationMessage newMessage, ImmutableList<MessageAttachment> messageAttachments) {
         Optional<Mailbox> fromAddress = newMessage.getFrom().filter(DraftEmailer::hasValidEmail).map(this::convertEmailToMimeHeader);
         fromAddress.ifPresent(messageBuilder::setFrom);
         fromAddress.ifPresent(messageBuilder::setSender);
@@ -176,8 +174,7 @@ public class MIMEMessageConverter {
                 addBody(newMessage, builder);
     
                 Consumer<MessageAttachment> addAttachment = addAttachment(builder);
-                messageAttachments.stream()
-                    .forEach(addAttachment);
+                messageAttachments.forEach(addAttachment);
     
                 return builder.build();
             } else {
@@ -204,8 +201,7 @@ public class MIMEMessageConverter {
         MultipartBuilder bodyBuilder = MultipartBuilder.create(ALTERNATIVE_SUB_TYPE);
         addText(bodyBuilder, newMessage.getTextBody());
         addHtml(bodyBuilder, newMessage.getHtmlBody());
-        Multipart body = bodyBuilder.build();
-        return body;
+        return bodyBuilder.build();
     }
 
     private void addText(MultipartBuilder builder, Optional<String> textBody) throws
IOException {
@@ -259,7 +255,7 @@ public class MIMEMessageConverter {
     }
 
     private ContentTypeField contentTypeField(MessageAttachment att) {
-        Builder<String, String> parameters = ImmutableMap.<String, String> builder();
+        Builder<String, String> parameters = ImmutableMap.builder();
         if (att.getName().isPresent()) {
             parameters.put("name", encode(att.getName().get()));
         }
@@ -275,7 +271,7 @@ public class MIMEMessageConverter {
     }
 
     private String contentTypeWithoutParameters(String type) {
-        return FluentIterable.from(Splitter.on(FIELD_PARAMETERS_SEPARATOR).split(type)).get(0);
+        return Splitter.on(FIELD_PARAMETERS_SEPARATOR).splitToList(type).get(0);
     }
 
     private ContentDispositionField contentDispositionField(boolean isInline) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/a34bc332/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
index beb0210..eb3c234 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/send/PostDequeueDecoratorTest.java
@@ -56,13 +56,13 @@ import org.apache.james.queue.api.MailQueue;
 import org.apache.james.queue.api.MailQueue.MailQueueItem;
 import org.apache.mailet.Mail;
 import org.apache.mailet.base.test.FakeMail;
-
-import com.google.common.collect.ImmutableList;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.ImmutableList;
+
 public class PostDequeueDecoratorTest {
     private static final Logger LOGGER = LoggerFactory.getLogger(PostDequeueDecoratorTest.class);
     private static final String OUTBOX = DefaultMailboxes.OUTBOX;
@@ -268,6 +268,7 @@ public class PostDequeueDecoratorTest {
         verifyNoMoreInteractions(messageIdManager);
     }
 
+    @SuppressWarnings("unchecked")
     @Test(expected = MailQueue.MailQueueException.class)
     public void doneShouldThrowWhenMailboxException() throws Exception {
         MessageIdManager messageIdManager = mock(MessageIdManager.class);


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


Mime
View raw message