james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [1/3] james-project git commit: Fix Eclipse warnings
Date Wed, 18 Jan 2017 20:20:12 GMT
Repository: james-project
Updated Branches:
  refs/heads/master 2e4005bc2 -> 40b25f848


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/d7ec83fd
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/d7ec83fd
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/d7ec83fd

Branch: refs/heads/master
Commit: d7ec83fd8ceaa4a1214bea031a653ac114ff7bb3
Parents: 7c7fb76
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Fri Jan 13 10:03:12 2017 +0100
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Wed Jan 18 14:48:11 2017 +0100

----------------------------------------------------------------------
 .../apache/james/backends/jpa/JpaTestCluster.java    |  9 +++++----
 .../apache/james/mailbox/jpa/JPAMailboxFixture.java  |  2 +-
 .../lucene/search/LuceneMessageSearchIndexTest.java  |  1 -
 .../james/mailbox/store/StoreMailboxManager.java     |  2 --
 .../search/comparator/HeaderMailboxComparator.java   |  2 --
 .../mailbox/store/search/CombinedComparatorTest.java | 12 ++++++++++++
 server/data/data-jpa/pom.xml                         |  1 -
 .../transport/mailets/remoteDelivery/Delay.java      |  3 ---
 .../mailets/remoteDelivery/MailDelivrer.java         |  3 +--
 .../transport/mailets/remoteDelivery/Repeat.java     |  1 +
 .../mailets/delivery/ToRecipientFolderTest.java      |  7 -------
 .../mailets/remoteDelivery/MailDelivrerTest.java     | 15 +--------------
 12 files changed, 21 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
----------------------------------------------------------------------
diff --git a/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
b/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
index 0ade077..f175ac6 100644
--- a/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
+++ b/backends-common/jpa/src/test/java/org/apache/james/backends/jpa/JpaTestCluster.java
@@ -21,6 +21,7 @@ package org.apache.james.backends.jpa;
 
 import java.util.Arrays;
 import java.util.HashMap;
+
 import javax.persistence.EntityManager;
 import javax.persistence.EntityManagerFactory;
 
@@ -32,7 +33,7 @@ import com.google.common.collect.FluentIterable;
 
 public class JpaTestCluster {
 
-    public static JpaTestCluster create(Class... clazz) {
+    public static JpaTestCluster create(Class<?>... clazz) {
         HashMap<String, String> properties = new HashMap<String, String>();
         properties.put("openjpa.ConnectionDriverName", org.h2.Driver.class.getName());
         properties.put("openjpa.ConnectionURL", "jdbc:h2:mem:mailboxintegration;DB_CLOSE_DELAY=-1");
// Memory H2 database
@@ -51,10 +52,10 @@ public class JpaTestCluster {
         return new JpaTestCluster(OpenJPAPersistence.getEntityManagerFactory(properties));
     }
 
-    private static Function<Class, String> toFQDN() {
-        return new Function<Class, String>() {
+    private static Function<Class<?>, String> toFQDN() {
+        return new Function<Class<?>, String>() {
             @Override
-            public String apply(Class input) {
+            public String apply(Class<?> input) {
                 return input.getName();
             }
         };

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxFixture.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxFixture.java
b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxFixture.java
index 7278c43..f73d0d1 100644
--- a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxFixture.java
+++ b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxFixture.java
@@ -29,7 +29,7 @@ import org.apache.james.mailbox.jpa.user.model.JPASubscription;
 
 public interface JPAMailboxFixture {
 
-    Class[] MAILBOX_PERSISTANCE_CLASSES = new Class[] {JPAMailbox.class,
+    Class<?>[] MAILBOX_PERSISTANCE_CLASSES = new Class[] {JPAMailbox.class,
         AbstractJPAMailboxMessage.class,
         JPAMailboxMessage.class,
         JPAProperty.class,

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndexTest.java
----------------------------------------------------------------------
diff --git a/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndexTest.java
b/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndexTest.java
index dfdaffd..62ce25f 100644
--- a/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndexTest.java
+++ b/mailbox/lucene/src/test/java/org/apache/james/mailbox/lucene/search/LuceneMessageSearchIndexTest.java
@@ -25,7 +25,6 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.apache.james.mailbox.inmemory.InMemoryMailboxManager;
 import org.apache.james.mailbox.inmemory.InMemoryMailboxSessionMapperFactory;
-import org.apache.james.mailbox.inmemory.InMemoryMessageId;
 import org.apache.james.mailbox.model.TestMessageId;
 import org.apache.james.mailbox.store.FakeAuthenticator;
 import org.apache.james.mailbox.store.JVMMailboxPathLocker;

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
index 5f83734..b4d83b4 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
@@ -82,8 +82,6 @@ import org.apache.james.mailbox.store.transaction.Mapper;
 import org.apache.james.mailbox.store.transaction.TransactionalMapper;
 import org.slf4j.Logger;
 
-import com.google.common.base.Optional;
-
 /**
  * This base class of an {@link MailboxManager} implementation provides a high-level api
for writing your own
  * {@link MailboxManager} implementation. If you plan to write your own {@link MailboxManager}
its most times so easiest

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/comparator/HeaderMailboxComparator.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/comparator/HeaderMailboxComparator.java
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/comparator/HeaderMailboxComparator.java
index f21befd..2c0c85d 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/comparator/HeaderMailboxComparator.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/comparator/HeaderMailboxComparator.java
@@ -23,8 +23,6 @@ import java.util.Comparator;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.search.SearchUtil;
 
-import com.google.common.base.Objects;
-
 public class HeaderMailboxComparator extends AbstractHeaderComparator{
     public final static Comparator<MailboxMessage> FROM_COMPARATOR = new HeaderMailboxComparator(FROM);
     public final static Comparator<MailboxMessage> TO_COMPARATOR = new HeaderMailboxComparator(TO);

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/CombinedComparatorTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/CombinedComparatorTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/CombinedComparatorTest.java
index ae3177c..fc2ceee 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/CombinedComparatorTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/CombinedComparatorTest.java
@@ -59,72 +59,84 @@ public class CombinedComparatorTest {
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertInternalDate() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.Arrival))).getComparators())
             .containsOnly(InternalDateComparator.INTERNALDATE);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertCc() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.MailboxCc))).getComparators())
             .containsOnly(HeaderMailboxComparator.CC_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertFrom() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.MailboxFrom))).getComparators())
             .containsOnly(HeaderMailboxComparator.FROM_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertTo() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.MailboxTo))).getComparators())
             .containsOnly(HeaderMailboxComparator.TO_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertSize() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.Size))).getComparators())
             .containsOnly(SizeComparator.SIZE);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertBaseSubject() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.BaseSubject))).getComparators())
             .containsOnly(BaseSubjectComparator.BASESUBJECT);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertUid() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.Uid))).getComparators())
             .containsOnly(UidComparator.UID);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertSentDate() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.SentDate))).getComparators())
             .containsOnly(SentDateComparator.SENTDATE);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertDisplayTo() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.DisplayTo))).getComparators())
             .containsOnly(HeaderDisplayComparator.TO_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertDisplayFrom() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.DisplayFrom))).getComparators())
             .containsOnly(HeaderDisplayComparator.FROM_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldConvertId() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.Id))).getComparators())
             .containsOnly(MessageIdComparator.MESSAGE_ID_COMPARATOR);
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void createShouldReverse() {
         assertThat(CombinedComparator.create(ImmutableList.of(new SearchQuery.Sort(SearchQuery.Sort.SortClause.DisplayFrom,
REVERSE))).getComparators())
             .containsOnly(new ReverseComparator(HeaderDisplayComparator.FROM_COMPARATOR));

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/data/data-jpa/pom.xml
----------------------------------------------------------------------
diff --git a/server/data/data-jpa/pom.xml b/server/data/data-jpa/pom.xml
index a40850b..64d44a5 100644
--- a/server/data/data-jpa/pom.xml
+++ b/server/data/data-jpa/pom.xml
@@ -128,7 +128,6 @@
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
             <scope>test</scope>
-            <version>${h2.version}</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Delay.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Delay.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Delay.java
index 3f50ea7..d293f13 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Delay.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Delay.java
@@ -31,9 +31,6 @@ import com.google.common.base.MoreObjects;
 import com.google.common.base.Objects;
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
 
 public class Delay {
     /**

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrer.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrer.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrer.java
index df38243..c2c75e5 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrer.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrer.java
@@ -40,6 +40,7 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 
+@SuppressWarnings("deprecation")
 public class MailDelivrer {
 
     private final RemoteDeliveryConfiguration configuration;
@@ -88,7 +89,6 @@ public class MailDelivrer {
         }
     }
 
-    @SuppressWarnings("deprecation")
     private ExecutionResult tryDeliver(Mail mail) throws MessagingException {
         if (mail.getRecipients().isEmpty()) {
             logger.info("No recipients specified... not sure how this could have happened.");
@@ -119,7 +119,6 @@ public class MailDelivrer {
         return rcpt.getDomain();
     }
 
-    @SuppressWarnings("deprecation")
     private ExecutionResult doDeliver(Mail mail, InternetAddress[] addr, Iterator<HostAddress>
targetServers) throws MessagingException {
         MessagingException lastError = null;
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Repeat.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Repeat.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Repeat.java
index 19682b1..5c26342 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Repeat.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/Repeat.java
@@ -27,6 +27,7 @@ import com.google.common.collect.Iterables;
 
 public class Repeat {
 
+    @SuppressWarnings("unchecked")
     public static <T> List<T> repeat(T element, int times) {
         Preconditions.checkArgument(times >= 0, "Times argument should be strictly positive");
         return ImmutableList.copyOf(

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/ToRecipientFolderTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/ToRecipientFolderTest.java
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/ToRecipientFolderTest.java
index 1c556a7..aed6d04 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/ToRecipientFolderTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/delivery/ToRecipientFolderTest.java
@@ -30,17 +30,10 @@ import static org.mockito.Mockito.when;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Date;
-import java.util.Properties;
 
-import javax.activation.DataHandler;
 import javax.mail.Flags;
 import javax.mail.MessagingException;
-import javax.mail.Session;
-import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-import javax.mail.util.ByteArrayDataSource;
 
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;

http://git-wip-us.apache.org/repos/asf/james-project/blob/d7ec83fd/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrerTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrerTest.java
b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrerTest.java
index b77fcb4..3456c0b 100644
--- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrerTest.java
+++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/remoteDelivery/MailDelivrerTest.java
@@ -51,15 +51,14 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.UnmodifiableIterator;
 import com.sun.mail.smtp.SMTPSenderFailedException;
 
+@SuppressWarnings("deprecation")
 public class MailDelivrerTest {
     private static final Logger LOGGER = LoggerFactory.getLogger(MailDelivrerTest.class);
     public static final String MX1_HOSTNAME = "mx1." + MailAddressFixture.JAMES2_APACHE_ORG;
     public static final String MX2_HOSTNAME = "mx2." + MailAddressFixture.JAMES2_APACHE_ORG;
     public static final String SMTP_URI2 = "protocol://userid:password@host:119/file1";
     public static final String SMTP_URI1 = "protocol://userid:password@host:119/file2";
-    @SuppressWarnings("deprecation")
     public static final HostAddress HOST_ADDRESS_1 = new HostAddress(MX1_HOSTNAME, SMTP_URI1);
-    @SuppressWarnings("deprecation")
     public static final HostAddress HOST_ADDRESS_2 = new HostAddress(MX2_HOSTNAME, SMTP_URI2);
 
     private MailDelivrer testee;
@@ -242,7 +241,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldReturnTemporaryErrorWhenFirstDNSProblem() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -255,7 +253,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldReturnTemporaryErrorWhenToleratedDNSProblem() throws Exception
{
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -269,7 +266,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldReturnPermanentErrorWhenLimitDNSProblemReached() throws Exception
{
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -285,7 +281,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.PERMANENT_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldReturnPermanentErrorWhenLimitDNSProblemExceeded() throws Exception
{
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -303,7 +298,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.PERMANENT_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldWork() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -320,7 +314,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.SUCCESS);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldAbortWhenServerError() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -337,7 +330,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.PERMANENT_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldAbortWithTemporaryWhenMessagingExceptionCauseUnknown() throws
Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -354,7 +346,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldTryTwiceOnIOException() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -373,7 +364,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.SUCCESS);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldAbortWhenServerErrorSFE() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -390,7 +380,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.PERMANENT_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldAttemptDeliveryOnlyOnceIfNoMoreValidUnsent() throws Exception
{
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -407,7 +396,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldAttemptDeliveryOnBothMXIfStillRecipients() throws Exception
{
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();
@@ -432,7 +420,6 @@ public class MailDelivrerTest {
         assertThat(executionResult.getExecutionState()).isEqualTo(ExecutionResult.ExecutionState.TEMPORARY_FAILURE);
     }
 
-    @SuppressWarnings("deprecation")
     @Test
     public void deliverShouldWorkIfOnlyMX2Valid() throws Exception {
         Mail mail = FakeMail.builder().recipients(MailAddressFixture.ANY_AT_JAMES, MailAddressFixture.OTHER_AT_JAMES).build();


---------------------------------------------------------------------
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