james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [4/4] james-project git commit: JAMES-2377 Stop using Throwables::propagate
Date Tue, 05 Jun 2018 02:08:04 GMT
JAMES-2377 Stop using Throwables::propagate

See https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate


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

Branch: refs/heads/master
Commit: 8b422da32275050badbfae5355bb86ecf33ebc05
Parents: b61e889
Author: benwa <btellier@linagora.com>
Authored: Tue May 29 11:54:21 2018 +0700
Committer: benwa <btellier@linagora.com>
Committed: Tue Jun 5 09:06:50 2018 +0700

----------------------------------------------------------------------
 .../backends/cassandra/CassandraCluster.java    |  5 ++-
 .../backends/es/EmbeddedElasticSearch.java      |  3 +-
 .../cassandra/mail/CassandraACLMapper.java      |  7 ++---
 .../mail/CassandraMessageIdMapper.java          |  3 +-
 .../mail/task/MailboxMergingTaskRunner.java     |  4 +--
 .../CassandraMailboxManagerProvider.java        |  3 +-
 .../cassandra/mail/CassandraACLMapperTest.java  |  4 +--
 .../elasticsearch/MailboxMappingFactory.java    |  4 +--
 .../elasticsearch/json/IndexableMessage.java    |  3 +-
 .../json/MessageToElasticSearchJsonTest.java    | 33 +++++++++-----------
 .../hbase/HBaseMailboxManagerStressTest.java    |  6 ++--
 .../mailbox/hbase/HBaseMailboxManagerTest.java  |  6 ++--
 .../mailbox/jcr/JCRMailboxManagerProvider.java  |  6 ++--
 .../jcr/JCRMailboxManagerStressTest.java        |  4 +--
 .../mailbox/jcr/JCRMailboxManagerTest.java      |  4 +--
 .../mailbox/jpa/mail/JPAAnnotationMapper.java   |  6 ++--
 .../mailbox/jpa/JpaMailboxManagerProvider.java  |  4 +--
 .../jpa/mail/TransactionalAnnotationMapper.java |  8 ++---
 ...mainUserMaildirMailboxManagerStressTest.java |  5 +--
 .../DomainUserMaildirMailboxManagerTest.java    |  4 +--
 ...FullUserMaildirMailboxManagerStressTest.java |  4 +--
 .../FullUserMaildirMailboxManagerTest.java      |  4 +--
 .../UserMaildirMailboxManagerStressTest.java    |  4 +--
 .../inmemory/mail/InMemoryMessageIdMapper.java  |  3 +-
 .../InMemoryMessageManagerTestSystem.java       | 12 +++----
 .../manager/InMemoryIntegrationResources.java   |  4 +--
 .../mailbox/store/StoreAttachmentManager.java   |  3 +-
 .../james/mailbox/store/StoreBlobManager.java   |  3 +-
 .../store/quota/CurrentQuotaCalculator.java     |  3 +-
 .../store/search/SimpleMessageSearchIndex.java  |  3 +-
 .../store/mail/model/ListMessageAssert.java     |  4 +--
 .../apache/mailet/base/MailAddressFixture.java  |  4 +--
 .../james/transport/mailets/AbstractSign.java   |  3 +-
 .../transport/mailets/RecipientToLowerCase.java | 16 +++-------
 .../transport/mailets/UseHeaderRecipients.java  |  3 +-
 .../utils/MailAddressCollectionReader.java      |  4 +--
 .../cassandra/host/CassandraHostSystemRule.java |  3 +-
 .../james/mpt/host/JamesImapHostSystem.java     |  4 +--
 .../imapmailbox/cyrus/host/CyrusHostSystem.java |  3 +-
 .../mpt/imapmailbox/cyrus/host/Docker.java      |  7 ++---
 .../host/LuceneSearchHostSystem.java            |  3 +-
 .../base/AbstractChainedProcessor.java          |  4 +--
 .../smtp/core/AbstractHookableCmdHandler.java   |  4 +--
 .../protocols/smtp/core/DataCmdHandler.java     |  3 +-
 .../modules/data/CassandraDomainListModule.java |  3 +-
 .../CassandraRecipientRewriteTableModule.java   |  3 +-
 .../data/CassandraUsersRepositoryModule.java    |  3 +-
 .../apache/james/DockerElasticSearchRule.java   |  3 +-
 .../james/data/LdapUsersRepositoryModule.java   |  3 +-
 .../james/CassandraLdapJamesServerTest.java     |  4 +--
 .../james/modules/server/DNSServiceModule.java  |  3 +-
 ...ltProcessorsConfigurationProviderModule.java |  3 +-
 .../modules/server/DropWizardMetricsModule.java |  3 +-
 .../server/MailStoreRepositoryModule.java       |  3 +-
 .../james/utils/GuiceProtocolHandlerLoader.java |  3 +-
 .../modules/ConfigurationsPerformerTest.java    |  7 ++---
 .../apache/james/modules/server/JMXServer.java  | 13 ++------
 .../james/modules/server/JMXServerModule.java   |  3 +-
 .../james/modules/data/JPADomainListModule.java |  3 +-
 .../data/JPARecipientRewriteTableModule.java    |  3 +-
 .../modules/data/JPAUsersRepositoryModule.java  |  3 +-
 .../apache/james/modules/MailboxProbeImpl.java  | 12 +++----
 .../modules/mailbox/DefaultEventModule.java     |  3 +-
 .../server/CamelMailetContainerModule.java      |  3 +-
 .../james/modules/data/MemoryDataModule.java    |  3 +-
 .../modules/protocols/IMAPServerModule.java     |  3 +-
 .../java/org/apache/james/jmap/JMAPModule.java  |  3 +-
 .../modules/protocols/JMAPServerModule.java     |  3 +-
 .../modules/protocols/LMTPServerModule.java     |  3 +-
 .../protocols/ManageSieveServerModule.java      |  3 +-
 .../modules/protocols/POP3ServerModule.java     |  3 +-
 .../modules/protocols/SMTPServerModule.java     |  3 +-
 .../modules/server/WebAdminServerModule.java    |  3 +-
 .../james/http/jetty/JettyHttpServer.java       |  3 +-
 .../mailbox/MailboxManagerManagement.java       |  7 ++---
 .../james/adapter/mailbox/QuotaManagement.java  | 23 +++++++-------
 .../adapter/mailbox/ReIndexerManagement.java    |  6 ++--
 .../james/metrics/es/ESMetricReporter.java      |  3 +-
 .../java/org/apache/james/util/MDCBuilder.java  |  3 +-
 .../util/concurrency/ConcurrentTestRunner.java  |  3 +-
 .../apache/james/rrt/hbase/HBaseStepdefs.java   |  4 +--
 .../james/user/jcr/JcrUserRepositoryTest.java   |  4 +--
 .../domainlist/lib/AbstractDomainList.java      |  3 +-
 .../dnsservice/api/InMemoryDNSService.java      |  7 ++---
 .../james/mailets/TemporaryJamesServer.java     |  3 +-
 .../james/transport/mailets/amqp/AmqpRule.java  |  3 +-
 .../mailets/redirect/SpecialAddress.java        |  4 +--
 .../apache/james/transport/util/Patterns.java   |  4 +--
 .../mailets/delivery/ToRecipientFolderTest.java |  4 +--
 .../cassandra/CassandraMailRepository.java      |  3 +-
 .../CassandraMailRepositoryMailDAO.java         |  7 ++---
 .../DefaultMailboxesProvisioningFilter.java     |  9 +++---
 .../java/org/apache/james/jmap/JMAPServlet.java |  3 +-
 .../james/jmap/UserProvisioningFilter.java      |  3 +-
 .../jmap/crypto/AccessTokenManagerImpl.java     |  3 +-
 .../jmap/crypto/JamesSignatureHandler.java      |  5 ++-
 .../event/PropagateLookupRightListener.java     |  4 +--
 .../jmap/json/MultipleClassesDeserializer.java  |  3 +-
 .../james/jmap/methods/GetMailboxesMethod.java  |  3 +-
 .../jmap/methods/GetMessageListMethod.java      |  3 +-
 .../james/jmap/methods/GetMessagesMethod.java   |  3 +-
 .../jmap/methods/MIMEMessageConverter.java      |  7 ++---
 .../methods/UpdateMessagePatchConverter.java    |  3 +-
 .../org/apache/james/jmap/model/Emailer.java    |  3 +-
 .../apache/james/jmap/model/MailboxFactory.java |  3 +-
 .../james/jmap/mailet/VacationReplyTest.java    |  4 +--
 .../SenderAuthIdentifyVerificationRcptHook.java |  4 +--
 .../james/webadmin/routes/TasksRoutesTest.java  |  5 ++-
 .../webadmin/routes/DomainQuotaRoutes.java      |  4 +--
 .../service/ClearMailRepositoryTask.java        |  4 +--
 .../james/queue/activemq/EmbeddedActiveMQ.java  |  4 +--
 .../activemq/ActiveMQMailQueueBlobTest.java     |  4 +--
 .../apache/james/queue/jms/JMSMailQueue.java    |  5 ++-
 .../james/task/MemoryTaskManagerTest.java       |  5 ++-
 114 files changed, 183 insertions(+), 346 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
----------------------------------------------------------------------
diff --git a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
index 692b2c4..19ab763 100644
--- a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
+++ b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
@@ -37,7 +37,6 @@ import org.apache.james.backends.cassandra.utils.FunctionRunnerWithRetry;
 import com.datastax.driver.core.Cluster;
 import com.datastax.driver.core.Session;
 import com.datastax.driver.core.exceptions.NoHostAvailableException;
-import com.google.common.base.Throwables;
 
 public final class CassandraCluster implements AutoCloseable {
 
@@ -78,7 +77,7 @@ public final class CassandraCluster implements AutoCloseable {
             session = new FunctionRunnerWithRetry(MAX_RETRY).executeAndRetrieveObject(CassandraCluster.this::tryInitializeSession);
             typesProvider = new CassandraTypesProvider(module, session);
         } catch (Exception exception) {
-            Throwables.propagate(exception);
+            throw new RuntimeException(exception);
         }
     }
 
@@ -110,7 +109,7 @@ public final class CassandraCluster implements AutoCloseable {
         try {
             Thread.sleep(sleepMs);
         } catch (InterruptedException interruptedException) {
-            Throwables.propagate(interruptedException);
+            throw new RuntimeException(interruptedException);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/EmbeddedElasticSearch.java
----------------------------------------------------------------------
diff --git a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/EmbeddedElasticSearch.java b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/EmbeddedElasticSearch.java
index 5f37189..b2146ab 100644
--- a/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/EmbeddedElasticSearch.java
+++ b/backends-common/elasticsearch/src/test/java/org/apache/james/backends/es/EmbeddedElasticSearch.java
@@ -37,7 +37,6 @@ import org.junit.rules.TemporaryFolder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
 import com.jayway.awaitility.Duration;
 
 public class EmbeddedElasticSearch extends ExternalResource {
@@ -52,7 +51,7 @@ public class EmbeddedElasticSearch extends ExternalResource {
         try {
             return temporaryFolder.newFolder().toPath();
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapper.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapper.java
index 9d497ee..2d4c997 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapper.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapper.java
@@ -53,7 +53,6 @@ import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.core.Row;
 import com.datastax.driver.core.Session;
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.google.common.base.Throwables;
 
 public class CassandraACLMapper {
     public static final int INITIAL_VALUE = 0;
@@ -182,7 +181,7 @@ public class CassandraACLMapper {
                 .thenApply(optional -> optional.filter(b -> b).map(any -> aclWithVersion.mailboxACL))
                 .join();
         } catch (JsonProcessingException exception) {
-            throw Throwables.propagate(exception);
+            throw new RuntimeException(exception);
         }
     }
 
@@ -196,7 +195,7 @@ public class CassandraACLMapper {
                 .thenApply(optional -> optional.filter(b -> b).map(any -> acl))
                 .join();
         } catch (JsonProcessingException exception) {
-            throw Throwables.propagate(exception);
+            throw new RuntimeException(exception);
         }
     }
 
@@ -237,7 +236,7 @@ public class CassandraACLMapper {
             try {
                 return new ACLWithVersion(version, mailboxACL.apply(command));
             } catch (UnsupportedRightException exception) {
-                throw Throwables.propagate(exception);
+                throw new RuntimeException(exception);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
index c1ab8af..3209266 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java
@@ -56,7 +56,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.github.steveash.guavate.Guavate;
-import com.google.common.base.Throwables;
 import com.google.common.collect.Multimap;
 
 public class CassandraMessageIdMapper implements MessageIdMapper {
@@ -257,7 +256,7 @@ public class CassandraMessageIdMapper implements MessageIdMapper {
                         .newFlags(composedMessageIdWithMetaData.getFlags())
                         .build()));
         } catch (LightweightTransactionException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } catch (MailboxDeleteDuringUpdateException e) {
             LOGGER.info("Mailbox {} was deleted during flag update", mailboxId);
             return Stream.of();

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java
index f22d24c..1a4a254 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java
@@ -39,8 +39,6 @@ import org.apache.james.task.Task;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 public class MailboxMergingTaskRunner {
     private static final Logger LOGGER = LoggerFactory.getLogger(MailboxMergingTaskRunner.class);
 
@@ -97,7 +95,7 @@ public class MailboxMergingTaskRunner {
             cassandraACLMapper.setACL(newMailboxId, finalAcl);
             rightsDAO.update(oldMailboxId, ACLDiff.computeDiff(oldAcl, MailboxACL.EMPTY)).join();
         } catch (MailboxException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerProvider.java b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerProvider.java
index 4eb765d..569def8 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerProvider.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/CassandraMailboxManagerProvider.java
@@ -45,7 +45,6 @@ import org.apache.james.mailbox.store.quota.ListeningCurrentQuotaUpdater;
 import org.apache.james.mailbox.store.quota.StoreQuotaManager;
 
 import com.datastax.driver.core.Session;
-import com.google.common.base.Throwables;
 
 public class CassandraMailboxManagerProvider {
     private static final int LIMIT_ANNOTATIONS = 3;
@@ -89,7 +88,7 @@ public class CassandraMailboxManagerProvider {
         try {
             manager.init();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
         return manager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapperTest.java b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapperTest.java
index b241980..41f9535 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapperTest.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraACLMapperTest.java
@@ -44,8 +44,6 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
 
-import com.google.common.base.Throwables;
-
 public class CassandraACLMapperTest {
 
     public static final CassandraId MAILBOX_ID = CassandraId.of(UUID.fromString("464765a0-e4e7-11e4-aba4-710c1de3782b"));
@@ -206,7 +204,7 @@ public class CassandraACLMapperTest {
             try {
                 aclMapper.updateACL(MAILBOX_ID, MailboxACL.command().key(key).rights(rights).asAddition());
             } catch (MailboxException exception) {
-                throw Throwables.propagate(exception);
+                throw new RuntimeException(exception);
             }
             return true;
         });

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/MailboxMappingFactory.java
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/MailboxMappingFactory.java b/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/MailboxMappingFactory.java
index ac75a5b..d6acd0b 100644
--- a/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/MailboxMappingFactory.java
+++ b/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/MailboxMappingFactory.java
@@ -74,8 +74,6 @@ import org.apache.james.mailbox.elasticsearch.json.JsonMessageConstants.EMailer;
 import org.apache.james.mailbox.elasticsearch.json.JsonMessageConstants.Property;
 import org.elasticsearch.common.xcontent.XContentBuilder;
 
-import com.google.common.base.Throwables;
-
 public class MailboxMappingFactory {
 
     private static final int MAXIMUM_TERM_LENGTH = 4096;
@@ -361,7 +359,7 @@ public class MailboxMappingFactory {
                     .endObject()
                 .endObject();
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessage.java
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessage.java b/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessage.java
index ffcb140..b6d9527 100644
--- a/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessage.java
+++ b/mailbox/elasticsearch/src/main/java/org/apache/james/mailbox/elasticsearch/json/IndexableMessage.java
@@ -43,7 +43,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Multimap;
 
@@ -80,7 +79,7 @@ public class IndexableMessage {
             try {
                 return instanciateIndexedMessage();
             } catch (IOException | MimeException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/MessageToElasticSearchJsonTest.java
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/MessageToElasticSearchJsonTest.java b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/MessageToElasticSearchJsonTest.java
index 3aa2de4..2e72092 100644
--- a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/MessageToElasticSearchJsonTest.java
+++ b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/MessageToElasticSearchJsonTest.java
@@ -55,7 +55,6 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 
 public class MessageToElasticSearchJsonTest {
@@ -289,26 +288,24 @@ public class MessageToElasticSearchJsonTest {
             .isEqualTo(ClassLoaderUtils.getSystemResourceAsString("eml/recursiveMailWithoutAttachments.json"));
     }
 
-    @Test(expected = NullPointerException.class)
-    public void emailWithNoMailboxIdShouldThrow() throws IOException {
+    @Test
+    public void emailWithNoMailboxIdShouldThrow() {
         MessageToElasticSearchJson messageToElasticSearchJson = new MessageToElasticSearchJson(
             new DefaultTextExtractor(),
             ZoneId.of("Europe/Paris"), IndexAttachments.YES);
-        MailboxMessage mailWithNoMailboxId;
-        try {
-            mailWithNoMailboxId = new SimpleMailboxMessage(MESSAGE_ID, date,
-                SIZE,
-                BODY_START_OCTET,
-                ClassLoaderUtils.getSystemResourceAsSharedStream("eml/recursiveMail.eml"),
-                new FlagsBuilder().add(Flags.Flag.DELETED, Flags.Flag.SEEN).add("debian", "security").build(),
-                propertyBuilder,
-                null);
-            mailWithNoMailboxId.setModSeq(MOD_SEQ);
-            mailWithNoMailboxId.setUid(UID);
-        } catch (Exception exception) {
-            throw Throwables.propagate(exception);
-        }
-        messageToElasticSearchJson.convertToJson(mailWithNoMailboxId, ImmutableList.of(MAILBOX_SESSION.getUser()));
+        MailboxMessage mailWithNoMailboxId = new SimpleMailboxMessage(MESSAGE_ID, date,
+            SIZE,
+            BODY_START_OCTET,
+            ClassLoaderUtils.getSystemResourceAsSharedStream("eml/recursiveMail.eml"),
+            new FlagsBuilder().add(Flags.Flag.DELETED, Flags.Flag.SEEN).add("debian", "security").build(),
+            propertyBuilder,
+            null);
+        mailWithNoMailboxId.setModSeq(MOD_SEQ);
+        mailWithNoMailboxId.setUid(UID);
+
+        assertThatThrownBy(() ->
+            messageToElasticSearchJson.convertToJson(mailWithNoMailboxId, ImmutableList.of(MAILBOX_SESSION.getUser())))
+            .isInstanceOf(NullPointerException.class);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerStressTest.java b/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerStressTest.java
index 6ee0777..3534db8 100644
--- a/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerStressTest.java
+++ b/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerStressTest.java
@@ -50,8 +50,6 @@ import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
 import org.junit.After;
 import org.junit.Ignore;
 
-import com.google.common.base.Throwables;
-
 @Ignore("https://issues.apache.org/jira/browse/MAILBOX-293")
 public class HBaseMailboxManagerStressTest extends MailboxManagerStressTest {
 
@@ -87,7 +85,7 @@ public class HBaseMailboxManagerStressTest extends MailboxManagerStressTest {
         try {
             manager.init();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
         return manager;
@@ -107,7 +105,7 @@ public class HBaseMailboxManagerStressTest extends MailboxManagerStressTest {
                 new byte[][]{MESSAGES_META_CF, MESSAGE_DATA_HEADERS_CF, MESSAGE_DATA_BODY_CF});
             CLUSTER.ensureTable(SUBSCRIPTIONS_TABLE, new byte[][]{SUBSCRIPTION_CF});
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerTest.java b/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerTest.java
index 36735f6..a37e79d 100644
--- a/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerTest.java
+++ b/mailbox/hbase/src/test/java/org/apache/james/mailbox/hbase/HBaseMailboxManagerTest.java
@@ -50,8 +50,6 @@ import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
 import org.junit.After;
 import org.junit.Ignore;
 
-import com.google.common.base.Throwables;
-
 @Ignore("https://issues.apache.org/jira/browse/MAILBOX-293")
 public class HBaseMailboxManagerTest extends MailboxManagerTest {
 
@@ -87,7 +85,7 @@ public class HBaseMailboxManagerTest extends MailboxManagerTest {
         try {
             manager.init();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
         return manager;
@@ -108,7 +106,7 @@ public class HBaseMailboxManagerTest extends MailboxManagerTest {
                 new byte[][]{MESSAGES_META_CF, MESSAGE_DATA_HEADERS_CF, MESSAGE_DATA_BODY_CF});
             CLUSTER.ensureTable(SUBSCRIPTIONS_TABLE, new byte[][]{SUBSCRIPTION_CF});
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java
index ed49335..9f4c613 100644
--- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java
+++ b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerProvider.java
@@ -39,8 +39,6 @@ import org.apache.james.mailbox.store.mail.model.DefaultMessageId;
 import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
 import org.xml.sax.InputSource;
 
-import com.google.common.base.Throwables;
-
 public class JCRMailboxManagerProvider {
     public static final String JACKRABBIT_HOME = "target/jackrabbit";
 
@@ -50,7 +48,7 @@ public class JCRMailboxManagerProvider {
             config = RepositoryConfig.create(new InputSource(JCRMailboxManagerTest.class.getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME);
             return RepositoryImpl.create(config);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -79,7 +77,7 @@ public class JCRMailboxManagerProvider {
         try {
             manager.init();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
         return manager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java
index fce7181..91e3d95 100644
--- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java
+++ b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerStressTest.java
@@ -32,8 +32,6 @@ import org.apache.james.mailbox.MailboxManagerStressTest;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.common.base.Throwables;
-
 public class JCRMailboxManagerStressTest extends MailboxManagerStressTest {
 
     private Optional<RepositoryImpl> repository = Optional.empty();
@@ -64,7 +62,7 @@ public class JCRMailboxManagerStressTest extends MailboxManagerStressTest {
             try {
                 FileUtils.forceDelete(new File(JACKRABBIT_HOME));
             } catch (IOException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
index 518618e..28baf61 100644
--- a/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
+++ b/mailbox/jcr/src/test/java/org/apache/james/mailbox/jcr/JCRMailboxManagerTest.java
@@ -31,8 +31,6 @@ import org.apache.james.mailbox.MailboxManagerTest;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.common.base.Throwables;
-
 public class JCRMailboxManagerTest extends MailboxManagerTest {
 
     private Optional<RepositoryImpl> repository = Optional.empty();
@@ -65,7 +63,7 @@ public class JCRMailboxManagerTest extends MailboxManagerTest {
             try {
                 FileUtils.forceDelete(new File(JACKRABBIT_HOME));
             } catch (IOException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/JPAAnnotationMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/JPAAnnotationMapper.java b/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/JPAAnnotationMapper.java
index 08566a1..3f194ab 100644
--- a/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/JPAAnnotationMapper.java
+++ b/mailbox/jpa/src/main/java/org/apache/james/mailbox/jpa/mail/JPAAnnotationMapper.java
@@ -24,6 +24,7 @@ import java.util.Optional;
 import java.util.Set;
 import java.util.function.Function;
 import java.util.function.Predicate;
+
 import javax.persistence.EntityManagerFactory;
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceException;
@@ -41,7 +42,6 @@ import org.slf4j.LoggerFactory;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
@@ -128,7 +128,7 @@ public class JPAAnnotationMapper extends JPATransactionalMapper implements Annot
         } catch (NoResultException e) {
             LOGGER.debug("Mailbox annotation not found for ID {} and key {}", mailboxId.serialize(), key.asString());
         } catch (PersistenceException pe) {
-            throw Throwables.propagate(pe);
+            throw new RuntimeException(pe);
         }
     }
 
@@ -163,7 +163,7 @@ public class JPAAnnotationMapper extends JPATransactionalMapper implements Annot
             return ((Long)getEntityManager().createNamedQuery("countAnnotationsInMailbox")
                 .setParameter("idParam", jpaId.getRawId()).getSingleResult()).intValue();
         } catch (PersistenceException pe) {
-            throw Throwables.propagate(pe);
+            throw new RuntimeException(pe);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JpaMailboxManagerProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JpaMailboxManagerProvider.java b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JpaMailboxManagerProvider.java
index d0aba5b..76555dc 100644
--- a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JpaMailboxManagerProvider.java
+++ b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/JpaMailboxManagerProvider.java
@@ -40,8 +40,6 @@ import org.apache.james.mailbox.store.event.MailboxEventDispatcher;
 import org.apache.james.mailbox.store.mail.model.DefaultMessageId;
 import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
 
-import com.google.common.base.Throwables;
-
 public class JpaMailboxManagerProvider {
 
     private static final int LIMIT_ANNOTATIONS = 3;
@@ -71,7 +69,7 @@ public class JpaMailboxManagerProvider {
         try {
             openJPAMailboxManager.init();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
         return openJPAMailboxManager;

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/TransactionalAnnotationMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/TransactionalAnnotationMapper.java b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/TransactionalAnnotationMapper.java
index 5d22541..6873e13 100644
--- a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/TransactionalAnnotationMapper.java
+++ b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/TransactionalAnnotationMapper.java
@@ -30,8 +30,6 @@ import org.apache.james.mailbox.model.MailboxId;
 import org.apache.james.mailbox.store.mail.AnnotationMapper;
 import org.apache.james.mailbox.store.transaction.Mapper;
 
-import com.google.common.base.Throwables;
-
 public class TransactionalAnnotationMapper implements AnnotationMapper {
     private final JPAAnnotationMapper wrapped;
 
@@ -45,7 +43,7 @@ public class TransactionalAnnotationMapper implements AnnotationMapper {
     }
 
     @Override
-    public <T> T execute(Transaction<T> transaction) throws MailboxException {
+    public <T> T execute(Transaction<T> transaction) {
         throw new NotImplementedException();
     }
 
@@ -74,7 +72,7 @@ public class TransactionalAnnotationMapper implements AnnotationMapper {
         try {
             wrapped.execute(Mapper.toTransaction(() -> wrapped.deleteAnnotation(mailboxId, key)));
         } catch (MailboxException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -83,7 +81,7 @@ public class TransactionalAnnotationMapper implements AnnotationMapper {
         try {
             wrapped.execute(Mapper.toTransaction(() -> wrapped.insertAnnotation(mailboxId, mailboxAnnotation)));
         } catch (MailboxException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerStressTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerStressTest.java
index 59a49bc..6e385e2 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerStressTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerStressTest.java
@@ -25,8 +25,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
-
 public class DomainUserMaildirMailboxManagerStressTest extends MailboxManagerStressTest {
     @Rule
     public TemporaryFolder tmpFolder = new TemporaryFolder();
@@ -42,9 +40,8 @@ public class DomainUserMaildirMailboxManagerStressTest extends MailboxManagerStr
         try {
             return MaildirMailboxManagerProvider.createMailboxManager("/%domain/%user", tmpFolder);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
-
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
index 6b4e0a0..eeb213a 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/DomainUserMaildirMailboxManagerTest.java
@@ -28,8 +28,6 @@ import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
-
 public class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest {
 
     @Rule
@@ -46,7 +44,7 @@ public class DomainUserMaildirMailboxManagerTest extends MailboxManagerTest {
         try {
             return MaildirMailboxManagerProvider.createMailboxManager("/%domain/%user", tmpFolder);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerStressTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerStressTest.java
index 9fa409a..dafe7e0 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerStressTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerStressTest.java
@@ -25,8 +25,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
-
 public class FullUserMaildirMailboxManagerStressTest extends MailboxManagerStressTest {
     @Rule
     public TemporaryFolder tmpFolder = new TemporaryFolder();
@@ -42,7 +40,7 @@ public class FullUserMaildirMailboxManagerStressTest extends MailboxManagerStres
         try {
             return MaildirMailboxManagerProvider.createMailboxManager("/%fulluser", tmpFolder);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerTest.java
index ad0b365..0aa8384 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/FullUserMaildirMailboxManagerTest.java
@@ -28,8 +28,6 @@ import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
-
 public class FullUserMaildirMailboxManagerTest extends MailboxManagerTest {
 
     @Rule
@@ -46,7 +44,7 @@ public class FullUserMaildirMailboxManagerTest extends MailboxManagerTest {
         try {
             return MaildirMailboxManagerProvider.createMailboxManager("/%fulluser", tmpFolder);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/UserMaildirMailboxManagerStressTest.java
----------------------------------------------------------------------
diff --git a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/UserMaildirMailboxManagerStressTest.java b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/UserMaildirMailboxManagerStressTest.java
index b074c9f..05f55fe 100644
--- a/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/UserMaildirMailboxManagerStressTest.java
+++ b/mailbox/maildir/src/test/java/org/apache/james/mailbox/maildir/UserMaildirMailboxManagerStressTest.java
@@ -25,8 +25,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
-
 public class UserMaildirMailboxManagerStressTest extends MailboxManagerStressTest {
     @Rule
     public TemporaryFolder tmpFolder = new TemporaryFolder();
@@ -42,7 +40,7 @@ public class UserMaildirMailboxManagerStressTest extends MailboxManagerStressTes
         try {
             return MaildirMailboxManagerProvider.createMailboxManager("/%user", tmpFolder);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageIdMapper.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageIdMapper.java b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageIdMapper.java
index 1c6039e..4407960 100644
--- a/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageIdMapper.java
+++ b/mailbox/memory/src/main/java/org/apache/james/mailbox/inmemory/mail/InMemoryMessageIdMapper.java
@@ -44,7 +44,6 @@ import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
 import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 
 public class InMemoryMessageIdMapper implements MessageIdMapper {
@@ -69,7 +68,7 @@ public class InMemoryMessageIdMapper implements MessageIdMapper {
                 .filter(message -> messageIds.contains(message.getMessageId()))
                 .collect(Guavate.toImmutableList());
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageManagerTestSystem.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageManagerTestSystem.java b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageManagerTestSystem.java
index f2385ed..7a2c98b 100644
--- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageManagerTestSystem.java
+++ b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/InMemoryMessageManagerTestSystem.java
@@ -41,8 +41,6 @@ import org.apache.james.mailbox.store.mail.model.impl.SimpleMailbox;
 import org.apache.james.mime4j.dom.Message;
 import org.apache.james.mime4j.message.DefaultMessageWriter;
 
-import com.google.common.base.Throwables;
-
 public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
 
     private static final MessageId FIRST_MESSAGE_ID = InMemoryMessageId.of(1);
@@ -53,7 +51,7 @@ public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
     private Optional<MessageId> lastMessageIdUsed;
     private final Message message;
 
-    public InMemoryMessageManagerTestSystem(MailboxManager mailboxManager) throws MailboxException {
+    public InMemoryMessageManagerTestSystem(MailboxManager mailboxManager) {
         super(mailboxManager);
         this.mailboxManager = mailboxManager;
         this.lastMessageIdUsed = Optional.empty();
@@ -63,7 +61,7 @@ public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
                 .setBody("testmail", StandardCharsets.UTF_8)
                 .build();
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -85,7 +83,7 @@ public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
             lastMessageIdUsed = Optional.of(messageId);
             return messageId;
         } catch (MailboxException | IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -102,7 +100,7 @@ public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
                 mailboxManager.deleteMailbox(mailbox.get().getPath(), session);
             }
         } catch (MailboxException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -121,7 +119,7 @@ public class InMemoryMessageManagerTestSystem extends MessageManagerTestSystem {
         try {
             return DefaultMessageWriter.asBytes(message).length;
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
index 5bc12fe..e6d6ee8 100644
--- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
+++ b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/manager/InMemoryIntegrationResources.java
@@ -55,8 +55,6 @@ import org.apache.james.mailbox.store.quota.DefaultUserQuotaRootResolver;
 import org.apache.james.mailbox.store.quota.ListeningCurrentQuotaUpdater;
 import org.apache.james.mailbox.store.quota.StoreQuotaManager;
 
-import com.google.common.base.Throwables;
-
 public class InMemoryIntegrationResources implements IntegrationResources<StoreMailboxManager> {
 
     public static class Resources {
@@ -173,7 +171,7 @@ public class InMemoryIntegrationResources implements IntegrationResources<StoreM
                 storeRightManager,
                 new InMemoryMessageId.Factory());
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
index 7552580..b4cd5e6 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
@@ -38,7 +38,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.github.steveash.guavate.Guavate;
-import com.google.common.base.Throwables;
 
 public class StoreAttachmentManager implements AttachmentManager {
     private static final Logger LOGGER = LoggerFactory.getLogger(StoreAttachmentManager.class);
@@ -91,7 +90,7 @@ public class StoreAttachmentManager implements AttachmentManager {
                 || isReferencedInUserMessages(attachmentId, mailboxSession);
         } catch (MailboxException e) {
             LOGGER.warn("Error while checking attachment related accessible message ids", e);
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreBlobManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreBlobManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreBlobManager.java
index ccb4f98..0b85405 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreBlobManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreBlobManager.java
@@ -39,7 +39,6 @@ import org.apache.james.mailbox.model.FetchGroupImpl;
 import org.apache.james.mailbox.model.MessageId;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 
 public class StoreBlobManager implements BlobManager {
@@ -103,7 +102,7 @@ public class StoreBlobManager implements BlobManager {
                 .map(Throwing.function(message -> message.getFullContent().getInputStream()))
                 .findFirst();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
index 17f1465..fbf4480 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/quota/CurrentQuotaCalculator.java
@@ -36,7 +36,6 @@ import org.apache.james.mailbox.store.mail.MessageMapper;
 import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 
 public class CurrentQuotaCalculator {
@@ -73,7 +72,7 @@ public class CurrentQuotaCalculator {
             try {
                 return mapper.findMailboxByPath(mailboxPath);
             } catch (MailboxException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
index 299e538..724c575 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndex.java
@@ -53,7 +53,6 @@ import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 
 /**
@@ -165,7 +164,7 @@ public class SimpleMessageSearchIndex implements MessageSearchIndex {
         try {
             return searchResults(session, mailbox, query).stream();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
index 1d1409d..b5b8049 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssert.java
@@ -33,7 +33,6 @@ import org.apache.james.mailbox.model.MessageId;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Objects;
-import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 
 public class ListMessageAssert {
@@ -50,8 +49,7 @@ public class ListMessageAssert {
             return new InnerMessage(message.getMessageId(), message.getUid(), message.getMailboxId(), message.getInternalDate(), message.getBodyOctets(),
                     message.getFullContentOctets(), message.getMediaType(), message.getSubType(), IOUtils.toString(message.getFullContent(), StandardCharsets.UTF_8));
         } catch (IOException e) {
-            Throwables.propagate(e);
-            return null;
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailet/base/src/test/java/org/apache/mailet/base/MailAddressFixture.java
----------------------------------------------------------------------
diff --git a/mailet/base/src/test/java/org/apache/mailet/base/MailAddressFixture.java b/mailet/base/src/test/java/org/apache/mailet/base/MailAddressFixture.java
index 24ebc74..51bd487 100644
--- a/mailet/base/src/test/java/org/apache/mailet/base/MailAddressFixture.java
+++ b/mailet/base/src/test/java/org/apache/mailet/base/MailAddressFixture.java
@@ -23,8 +23,6 @@ import javax.mail.internet.AddressException;
 
 import org.apache.james.core.MailAddress;
 
-import com.google.common.base.Throwables;
-
 public class MailAddressFixture {
     public static final String JAMES_LOCAL = "localhost";
     public static final String JAMES_APACHE_ORG = "james.apache.org";
@@ -47,7 +45,7 @@ public class MailAddressFixture {
         try {
             return new MailAddress(mailAddress);
         } catch (AddressException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailet/crypto/src/main/java/org/apache/james/transport/mailets/AbstractSign.java
----------------------------------------------------------------------
diff --git a/mailet/crypto/src/main/java/org/apache/james/transport/mailets/AbstractSign.java b/mailet/crypto/src/main/java/org/apache/james/transport/mailets/AbstractSign.java
index a81f1e6..a1cbb19 100644
--- a/mailet/crypto/src/main/java/org/apache/james/transport/mailets/AbstractSign.java
+++ b/mailet/crypto/src/main/java/org/apache/james/transport/mailets/AbstractSign.java
@@ -46,7 +46,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Objects;
-import com.google.common.base.Throwables;
 
 /**
  * <P>Abstract mailet providing common SMIME signature services.
@@ -607,7 +606,7 @@ public abstract class AbstractSign extends GenericMailet {
         try {
             return usersRepository.getUser(mailAddress);
         } catch (UsersRepositoryException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailet/standard/src/main/java/org/apache/james/transport/mailets/RecipientToLowerCase.java
----------------------------------------------------------------------
diff --git a/mailet/standard/src/main/java/org/apache/james/transport/mailets/RecipientToLowerCase.java b/mailet/standard/src/main/java/org/apache/james/transport/mailets/RecipientToLowerCase.java
index f87fc42..58ade22 100644
--- a/mailet/standard/src/main/java/org/apache/james/transport/mailets/RecipientToLowerCase.java
+++ b/mailet/standard/src/main/java/org/apache/james/transport/mailets/RecipientToLowerCase.java
@@ -27,30 +27,24 @@ import org.apache.james.core.MailAddress;
 import org.apache.mailet.Mail;
 import org.apache.mailet.base.GenericMailet;
 
+import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
-import com.google.common.base.Throwables;
-
 
 /**
  * {@link GenericMailet} which convert all Recipients to lowercase
- * 
- *
  */
 public class RecipientToLowerCase extends GenericMailet {
 
     @Override
     public void service(Mail mail) throws MessagingException {
         mail.setRecipients(mail.getRecipients().stream()
-            .map(this::toLowerCase)
+            .map(Throwing.function(this::toLowerCase))
             .collect(Guavate.toImmutableList()));
     }
 
-    private MailAddress toLowerCase(MailAddress mailAddress) {
-        try {
-            return new MailAddress(mailAddress.asString().toLowerCase(Locale.US));
-        } catch (AddressException e) {
-            throw Throwables.propagate(e);
-        }
+    private MailAddress toLowerCase(MailAddress mailAddress) throws AddressException {
+        return new MailAddress(mailAddress.asString()
+            .toLowerCase(Locale.US));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailet/standard/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
----------------------------------------------------------------------
diff --git a/mailet/standard/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java b/mailet/standard/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
index 63deea9..85c6887 100644
--- a/mailet/standard/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
+++ b/mailet/standard/src/main/java/org/apache/james/transport/mailets/UseHeaderRecipients.java
@@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Splitter;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 
 /**
@@ -183,7 +182,7 @@ public class UseHeaderRecipients extends GenericMailet {
         try {
             return new MailAddress(mailbox.getAddress());
         } catch (AddressException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mailet/standard/src/main/java/org/apache/james/transport/matchers/utils/MailAddressCollectionReader.java
----------------------------------------------------------------------
diff --git a/mailet/standard/src/main/java/org/apache/james/transport/matchers/utils/MailAddressCollectionReader.java b/mailet/standard/src/main/java/org/apache/james/transport/matchers/utils/MailAddressCollectionReader.java
index bbbbbba..5bf5ea1 100644
--- a/mailet/standard/src/main/java/org/apache/james/transport/matchers/utils/MailAddressCollectionReader.java
+++ b/mailet/standard/src/main/java/org/apache/james/transport/matchers/utils/MailAddressCollectionReader.java
@@ -20,6 +20,7 @@
 package org.apache.james.transport.matchers.utils;
 
 import java.util.Set;
+
 import javax.mail.internet.AddressException;
 
 import org.apache.james.core.MailAddress;
@@ -28,7 +29,6 @@ import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Splitter;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 
 
 public class MailAddressCollectionReader {
@@ -46,7 +46,7 @@ public class MailAddressCollectionReader {
         try {
             return new MailAddress(s);
         } catch (AddressException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystemRule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystemRule.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystemRule.java
index 4dd951f..cc4a30b 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystemRule.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystemRule.java
@@ -25,7 +25,6 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
 import org.junit.rules.ExternalResource;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Throwables;
 
 public class CassandraHostSystemRule extends ExternalResource {
 
@@ -49,7 +48,7 @@ public class CassandraHostSystemRule extends ExternalResource {
         try {
             clean();
         } catch (Exception e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
index 1d6fe94..f0ef2e9 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/host/JamesImapHostSystem.java
@@ -43,8 +43,6 @@ import org.apache.james.mpt.helper.ByteBufferOutputStream;
 import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
 import org.apache.james.user.memory.MemoryUsersRepository;
 
-import com.google.common.base.Throwables;
-
 public abstract class JamesImapHostSystem implements ImapHostSystem, GrantRightsOnHost {
 
     private MemoryUsersRepository memoryUsersRepository;
@@ -62,7 +60,7 @@ public abstract class JamesImapHostSystem implements ImapHostSystem, GrantRights
         try {
             memoryUsersRepository.configure(userRepositoryConfiguration());
         } catch (ConfigurationException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
         authenticator = new UserRepositoryAuthenticator(memoryUsersRepository);
         authorizator = new UserRepositoryAuthorizator(memoryUsersRepository);

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
index 220972c..0458861 100644
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
@@ -35,7 +35,6 @@ import org.apache.james.mpt.protocol.ProtocolSession;
 
 import com.google.common.base.Joiner;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -130,7 +129,7 @@ public class CyrusHostSystem extends ExternalHostSystem implements Provider<Cont
                 session.stop();
             }
         } catch (Exception e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
index c52fd3d..31767bb 100644
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/Docker.java
@@ -23,7 +23,6 @@ import java.net.Socket;
 import java.net.UnknownHostException;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.jayway.awaitility.Awaitility;
@@ -57,7 +56,7 @@ public class Docker {
             dockerClient = DefaultDockerClient.fromEnv().build();
             dockerClient.pull(imageName);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -90,7 +89,7 @@ public class Docker {
             dockerClient.killContainer(container.id());
             dockerClient.removeContainer(container.id(), true);
         } catch (DockerException | InterruptedException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
     
@@ -109,7 +108,7 @@ public class Docker {
                                     .get(EXPOSED_IMAP_PORT))
                             .hostPort());
         } catch (NumberFormatException | DockerException | InterruptedException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
index 5650706..63b31a0 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/host/LuceneSearchHostSystem.java
@@ -66,7 +66,6 @@ import org.apache.james.mpt.api.ImapFeatures.Feature;
 import org.apache.james.mpt.host.JamesImapHostSystem;
 import org.apache.lucene.store.FSDirectory;
 
-import com.google.common.base.Throwables;
 import com.google.common.io.Files;
 
 public class LuceneSearchHostSystem extends JamesImapHostSystem {
@@ -151,7 +150,7 @@ public class LuceneSearchHostSystem extends JamesImapHostSystem {
                 defaultImapProcessorFactory);
 
         } catch (IOException | MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
index 0de3dbf..823f4ed 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
@@ -29,8 +29,6 @@ import org.apache.james.imap.api.process.ImapSession;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 public abstract class AbstractChainedProcessor<M extends ImapMessage> implements ImapProcessor {
 
     public static final Logger LOGGER = LoggerFactory.getLogger(AbstractChainedProcessor.class);
@@ -62,7 +60,7 @@ public abstract class AbstractChainedProcessor<M extends ImapMessage> implements
                     throw e;
                 }
             } catch (IOException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         } else {
             next.process(message, responder, session);

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
index 8a5a869..9d2ef48 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
@@ -45,8 +45,6 @@ import org.apache.james.util.OptionalUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 /**
  * Abstract class which Handle hook-aware CommanHandler.
  * 
@@ -86,7 +84,7 @@ public abstract class AbstractHookableCmdHandler<HookT extends org.apache.james.
                 return response;
             }
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             timeMetric.stopAndPublish();
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
index d16639c..0a0e594 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
@@ -48,7 +48,6 @@ import org.apache.james.protocols.smtp.SMTPSession;
 import org.apache.james.protocols.smtp.dsn.DSNStatus;
 import org.apache.james.util.MDCBuilder;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableSet;
 
 
@@ -154,7 +153,7 @@ public class DataCmdHandler implements CommandHandler<SMTPSession>, ExtensibleHa
                 return response;
             }
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             timeMetric.stopAndPublish();
             session.needsCommandInjectionDetection();

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java
index 9830600..1ef8a9c 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraDomainListModule.java
@@ -28,7 +28,6 @@ import org.apache.james.lifecycle.api.Configurable;
 import org.apache.james.server.core.configuration.ConfigurationProvider;
 import org.apache.james.utils.ConfigurationPerformer;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -63,7 +62,7 @@ public class CassandraDomainListModule extends AbstractModule {
             try {
                 cassandraDomainList.configure(configurationProvider.getConfiguration("domainlist"));
             } catch (ConfigurationException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraRecipientRewriteTableModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraRecipientRewriteTableModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraRecipientRewriteTableModule.java
index 7943220..0d0e4bf 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraRecipientRewriteTableModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraRecipientRewriteTableModule.java
@@ -29,7 +29,6 @@ import org.apache.james.rrt.cassandra.CassandraRecipientRewriteTable;
 import org.apache.james.server.core.configuration.ConfigurationProvider;
 import org.apache.james.utils.ConfigurationPerformer;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -65,7 +64,7 @@ public class CassandraRecipientRewriteTableModule extends AbstractModule {
             try {
                 recipientRewriteTable.configure(configurationProvider.getConfiguration("recipientrewritetable"));
             } catch (ConfigurationException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraUsersRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraUsersRepositoryModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraUsersRepositoryModule.java
index b031118..a495699 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraUsersRepositoryModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/data/CassandraUsersRepositoryModule.java
@@ -28,7 +28,6 @@ import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.cassandra.CassandraUsersRepository;
 import org.apache.james.utils.ConfigurationPerformer;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -64,7 +63,7 @@ public class CassandraUsersRepositoryModule extends AbstractModule {
             try {
                 usersRepository.configure(configurationProvider.getConfiguration("usersrepository"));
             } catch (ConfigurationException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DockerElasticSearchRule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DockerElasticSearchRule.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DockerElasticSearchRule.java
index c6c0679..c86fd38 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DockerElasticSearchRule.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/DockerElasticSearchRule.java
@@ -27,7 +27,6 @@ import org.apache.james.util.docker.SwarmGenericContainer;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
-import com.google.common.base.Throwables;
 import com.google.inject.Module;
 
 
@@ -56,7 +55,7 @@ public class DockerElasticSearchRule implements GuiceModuleTestRule {
         try {
             return ElasticSearchConfiguration.fromProperties(configuration);
         } catch (ConfigurationException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/data/LdapUsersRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/data/LdapUsersRepositoryModule.java b/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/data/LdapUsersRepositoryModule.java
index 3ef84fc..6fcab3c 100644
--- a/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/data/LdapUsersRepositoryModule.java
+++ b/server/container/guice/cassandra-ldap-guice/src/main/java/org/apache/james/data/LdapUsersRepositoryModule.java
@@ -26,7 +26,6 @@ import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository;
 import org.apache.james.utils.ConfigurationPerformer;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -62,7 +61,7 @@ public class LdapUsersRepositoryModule extends AbstractModule {
                 usersRepository.configure(configurationProvider.getConfiguration("usersrepository"));
                 usersRepository.init();
             } catch (Exception e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
index 9e7150f..c6a8eca 100644
--- a/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
+++ b/server/container/guice/cassandra-ldap-guice/src/test/java/org/apache/james/CassandraLdapJamesServerTest.java
@@ -29,8 +29,6 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 
-import com.google.common.base.Throwables;
-
 public class CassandraLdapJamesServerTest extends AbstractJmapJamesServerTest {
     private static final String JAMES_USER = "james-user";
     private static final String PASSWORD = "secret";
@@ -62,7 +60,7 @@ public class CassandraLdapJamesServerTest extends AbstractJmapJamesServerTest {
         try {
             imapClient.disconnect();
         } catch (IOException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
index abae17b..ae746ba 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DNSServiceModule.java
@@ -26,7 +26,6 @@ import org.apache.james.lifecycle.api.Configurable;
 import org.apache.james.server.core.configuration.ConfigurationProvider;
 import org.apache.james.utils.ConfigurationPerformer;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -62,7 +61,7 @@ public class DNSServiceModule extends AbstractModule {
                 dnsService.configure(configurationProvider.getConfiguration("dnsservice"));
                 dnsService.init();
             } catch (Exception e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DefaultProcessorsConfigurationProviderModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DefaultProcessorsConfigurationProviderModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DefaultProcessorsConfigurationProviderModule.java
index 6f31961..a0fa98d 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DefaultProcessorsConfigurationProviderModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DefaultProcessorsConfigurationProviderModule.java
@@ -22,7 +22,6 @@ package org.apache.james.modules.server;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.james.server.core.configuration.FileConfigurationProvider;
 
-import com.google.common.base.Throwables;
 import com.google.inject.AbstractModule;
 
 public class DefaultProcessorsConfigurationProviderModule extends AbstractModule {
@@ -35,7 +34,7 @@ public class DefaultProcessorsConfigurationProviderModule extends AbstractModule
                     try {
                         return FileConfigurationProvider.getConfig(ClassLoader.getSystemResourceAsStream("defaultMailetContainer.xml"));
                     } catch (ConfigurationException e) {
-                        throw Throwables.propagate(e);
+                        throw new RuntimeException(e);
                     }
                 }
             );

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DropWizardMetricsModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DropWizardMetricsModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DropWizardMetricsModule.java
index c5eb73d..4bd9054 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DropWizardMetricsModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/DropWizardMetricsModule.java
@@ -32,7 +32,6 @@ import org.apache.james.metrics.dropwizard.DropWizardMetricFactory;
 import org.apache.james.utils.ConfigurationPerformer;
 
 import com.codahale.metrics.MetricRegistry;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -71,7 +70,7 @@ public class DropWizardMetricsModule extends AbstractModule {
             try {
                 dropWizardInitializer.configure(NO_CONFIGURATION);
             } catch (ConfigurationException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
index 5ad0c61..a7e9eda 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/server/MailStoreRepositoryModule.java
@@ -33,7 +33,6 @@ import org.apache.james.utils.InMemoryMailRepositoryStore;
 import org.apache.james.utils.MailRepositoryProbeImpl;
 import org.apache.james.utils.MailRepositoryProvider;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -96,7 +95,7 @@ public class MailStoreRepositoryModule extends AbstractModule {
                 javaMailRepositoryStore.configure(configurationProvider.getConfiguration("mailrepositorystore"));
                 javaMailRepositoryStore.init();
             } catch (Exception e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 


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