james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [3/4] james-project git commit: JAMES-2377 Stop using Throwables::propagate
Date Tue, 05 Jun 2018 02:08:03 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java
index e4b673f..18ade71 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceProtocolHandlerLoader.java
@@ -24,7 +24,6 @@ import org.apache.commons.configuration.ConfigurationException;
 import org.apache.james.protocols.api.handler.ProtocolHandler;
 import org.apache.james.protocols.lib.handler.ProtocolHandlerLoader;
 
-import com.google.common.base.Throwables;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
@@ -45,7 +44,7 @@ public class GuiceProtocolHandlerLoader implements ProtocolHandlerLoader {
         try {
             handler.init(config);
         } catch (ConfigurationException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
         return handler;
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/guice-common/src/test/java/org/apache/james/modules/ConfigurationsPerformerTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/test/java/org/apache/james/modules/ConfigurationsPerformerTest.java b/server/container/guice/guice-common/src/test/java/org/apache/james/modules/ConfigurationsPerformerTest.java
index 023897b..64a2d2f 100644
--- a/server/container/guice/guice-common/src/test/java/org/apache/james/modules/ConfigurationsPerformerTest.java
+++ b/server/container/guice/guice-common/src/test/java/org/apache/james/modules/ConfigurationsPerformerTest.java
@@ -32,7 +32,6 @@ import org.apache.james.utils.ConfigurationPerformer;
 import org.apache.james.utils.ConfigurationsPerformer;
 import org.junit.Test;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -79,7 +78,7 @@ public class ConfigurationsPerformerTest {
             try {
                 a.configure(null);
             } catch (ConfigurationException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 
@@ -103,7 +102,7 @@ public class ConfigurationsPerformerTest {
             try {
                 b.configure(null);
             } catch (ConfigurationException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
 
@@ -197,7 +196,7 @@ public class ConfigurationsPerformerTest {
                 b.configure(null);
                 configured = true;
             } 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/jmx/src/main/java/org/apache/james/modules/server/JMXServer.java
----------------------------------------------------------------------
diff --git a/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServer.java b/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServer.java
index 20f724f..9fc69fe 100644
--- a/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServer.java
+++ b/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServer.java
@@ -43,7 +43,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableMap;
 
 public class JMXServer {
@@ -109,7 +108,7 @@ public class JMXServer {
 
             jmxConnectorServer.start();
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -125,20 +124,14 @@ public class JMXServer {
     private void doStop() {
         try {
             MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
-            registeredKeys.forEach(key -> {
-                try {
-                    mBeanServer.unregisterMBean(new ObjectName(key));
-                } catch (Exception e) {
-                    throw Throwables.propagate(e);
-                }
-            });
+            registeredKeys.forEach(Throwing.consumer(key -> mBeanServer.unregisterMBean(new ObjectName(key))));
             registeredKeys.clear();
             jmxConnectorServer.stop();
             restrictingRMISocketFactory.getSockets()
                 .forEach(Throwing.consumer(ServerSocket::close)
                     .sneakyThrow());
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServerModule.java b/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServerModule.java
index 428a8d2..ca6938f 100644
--- a/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServerModule.java
+++ b/server/container/guice/jmx/src/main/java/org/apache/james/modules/server/JMXServerModule.java
@@ -48,7 +48,6 @@ import org.apache.james.user.lib.UsersRepositoryManagement;
 import org.apache.james.utils.ConfigurationPerformer;
 import org.apache.james.utils.GuiceMailboxManagerResolver;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -142,7 +141,7 @@ public class JMXServerModule extends AbstractModule {
                 jmxServer.register(JMX_COMPONENT_QUOTA, quotaManagementMBean);
                 jmxServer.register(JMX_COMPONENT_SIEVE, sieveRepositoryManagementMBean);
             } 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/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPADomainListModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPADomainListModule.java b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPADomainListModule.java
index ba9c312..3aaa16f 100644
--- a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPADomainListModule.java
+++ b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPADomainListModule.java
@@ -27,7 +27,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;
@@ -61,7 +60,7 @@ public class JPADomainListModule extends AbstractModule {
             try {
                 jpaDomainList.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/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPARecipientRewriteTableModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPARecipientRewriteTableModule.java b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPARecipientRewriteTableModule.java
index 719c105..821d69a 100644
--- a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPARecipientRewriteTableModule.java
+++ b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPARecipientRewriteTableModule.java
@@ -27,7 +27,6 @@ import org.apache.james.rrt.jpa.JPARecipientRewriteTable;
 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;
@@ -61,7 +60,7 @@ public class JPARecipientRewriteTableModule 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/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPAUsersRepositoryModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPAUsersRepositoryModule.java b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPAUsersRepositoryModule.java
index eac4aaf..aa8529d 100644
--- a/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPAUsersRepositoryModule.java
+++ b/server/container/guice/jpa-common-guice/src/main/java/org/apache/james/modules/data/JPAUsersRepositoryModule.java
@@ -27,7 +27,6 @@ import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.jpa.JPAUsersRepository;
 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;
@@ -61,7 +60,7 @@ public class JPAUsersRepositoryModule 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/mailbox/src/main/java/org/apache/james/modules/MailboxProbeImpl.java
----------------------------------------------------------------------
diff --git a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/MailboxProbeImpl.java b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/MailboxProbeImpl.java
index ce3d08d..b7a85c7 100644
--- a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/MailboxProbeImpl.java
+++ b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/MailboxProbeImpl.java
@@ -47,8 +47,6 @@ import org.apache.james.mailbox.store.mail.model.Mailbox;
 import org.apache.james.mailbox.store.probe.MailboxProbe;
 import org.apache.james.utils.GuiceProbe;
 
-import com.google.common.base.Throwables;
-
 public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
     private final MailboxManager mailboxManager;
     private final MailboxMapperFactory mailboxMapperFactory;
@@ -71,7 +69,7 @@ public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
             return mailboxManager.createMailbox(new MailboxPath(namespace, user, name), mailboxSession)
                     .orElseThrow(() -> new MailboxException("mailbox name is probably empty"));
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(mailboxSession);
         }
@@ -86,7 +84,7 @@ public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
             MailboxMapper mailboxMapper = mailboxMapperFactory.getMailboxMapper(mailboxSession);
             return mailboxMapper.findMailboxByPath(new MailboxPath(namespace, user, name));
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(mailboxSession);
         }
@@ -98,7 +96,7 @@ public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
             try {
                 mailboxManager.logout(session, true);
             } catch (MailboxException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }
@@ -115,7 +113,7 @@ public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
                     .map(MailboxPath::getName)
                     .collect(Collectors.toList());
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(mailboxSession);
         }
@@ -138,7 +136,7 @@ public class MailboxProbeImpl implements GuiceProbe, MailboxProbe {
             mailboxManager.startProcessingRequest(mailboxSession);
             mailboxManager.deleteMailbox(new MailboxPath(namespace, user, name), mailboxSession);
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(mailboxSession);
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
index 70c3590..9cf2f97 100644
--- a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
+++ b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
@@ -36,7 +36,6 @@ import org.apache.james.mailbox.store.quota.ListeningCurrentQuotaUpdater;
 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.Scopes;
@@ -81,7 +80,7 @@ public class DefaultEventModule extends AbstractModule {
             try {
                 listeners.configure(configurationProvider.getConfiguration("listeners"));
             } 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/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java b/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
index 1f742a8..a8b9d7c 100644
--- a/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
+++ b/server/container/guice/mailet/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java
@@ -52,7 +52,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -137,7 +136,7 @@ public class CamelMailetContainerModule extends AbstractModule {
                 configureJamesSpooler();
                 configureMailetContext();
             } catch (Exception e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
 
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
index 90b689d..f5c4c80 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
@@ -32,7 +32,6 @@ import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.memory.MemoryUsersRepository;
 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;
@@ -78,7 +77,7 @@ public class MemoryDataModule extends AbstractModule {
                 memoryDomainList.configure(configurationProvider.getConfiguration("domainlist"));
                 memoryRecipientRewriteTable.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/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java b/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
index 07ae885..bd608cf 100644
--- a/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
+++ b/server/container/guice/protocols/imap/src/main/java/org/apache/james/modules/protocols/IMAPServerModule.java
@@ -37,7 +37,6 @@ import org.apache.james.modules.Names;
 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;
@@ -99,7 +98,7 @@ public class IMAPServerModule extends AbstractModule {
                 imapServerFactory.configure(configurationProvider.getConfiguration("imapserver"));
                 imapServerFactory.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/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
index 30227c0..111b2f7 100644
--- a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
+++ b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
@@ -54,7 +54,6 @@ import org.slf4j.LoggerFactory;
 
 import com.github.fge.lambdas.Throwing;
 import com.google.common.base.Preconditions;
-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 JMAPModule extends AbstractModule {
             try {
                 return FileConfigurationProvider.getConfig(ClassLoader.getSystemResourceAsStream("defaultJmapMailetContainer.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/protocols/jmap/src/main/java/org/apache/james/modules/protocols/JMAPServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/modules/protocols/JMAPServerModule.java b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/modules/protocols/JMAPServerModule.java
index d13d3eb..33b555e 100644
--- a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/modules/protocols/JMAPServerModule.java
+++ b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/modules/protocols/JMAPServerModule.java
@@ -34,7 +34,6 @@ import org.apache.james.utils.JmapGuiceProbe;
 import org.apache.james.utils.MessageIdProbe;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -76,7 +75,7 @@ public class JMAPServerModule extends AbstractModule {
                     registerPEMWithSecurityProvider();
                 }
             } 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/protocols/lmtp/src/main/java/org/apache/james/modules/protocols/LMTPServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/lmtp/src/main/java/org/apache/james/modules/protocols/LMTPServerModule.java b/server/container/guice/protocols/lmtp/src/main/java/org/apache/james/modules/protocols/LMTPServerModule.java
index 38eacb5..4d20631 100644
--- a/server/container/guice/protocols/lmtp/src/main/java/org/apache/james/modules/protocols/LMTPServerModule.java
+++ b/server/container/guice/protocols/lmtp/src/main/java/org/apache/james/modules/protocols/LMTPServerModule.java
@@ -26,7 +26,6 @@ import org.apache.james.lmtpserver.netty.LMTPServerFactory;
 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;
@@ -58,7 +57,7 @@ public class LMTPServerModule extends AbstractModule {
                 lmtpServerFactory.configure(configurationProvider.getConfiguration("lmtpserver"));
                 lmtpServerFactory.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/protocols/managedsieve/src/main/java/org/apache/james/modules/protocols/ManageSieveServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/managedsieve/src/main/java/org/apache/james/modules/protocols/ManageSieveServerModule.java b/server/container/guice/protocols/managedsieve/src/main/java/org/apache/james/modules/protocols/ManageSieveServerModule.java
index b4d4e51..2f87370 100644
--- a/server/container/guice/protocols/managedsieve/src/main/java/org/apache/james/modules/protocols/ManageSieveServerModule.java
+++ b/server/container/guice/protocols/managedsieve/src/main/java/org/apache/james/modules/protocols/ManageSieveServerModule.java
@@ -28,7 +28,6 @@ import org.apache.james.server.core.configuration.ConfigurationProvider;
 import org.apache.james.utils.ConfigurationPerformer;
 import org.apache.james.utils.GuiceProbe;
 
-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 ManageSieveServerModule extends AbstractModule {
                 manageSieveServerFactory.configure(configurationProvider.getConfiguration("managesieveserver"));
                 manageSieveServerFactory.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/protocols/pop/src/main/java/org/apache/james/modules/protocols/POP3ServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/pop/src/main/java/org/apache/james/modules/protocols/POP3ServerModule.java b/server/container/guice/protocols/pop/src/main/java/org/apache/james/modules/protocols/POP3ServerModule.java
index 4fd8b57..4fbc30e 100644
--- a/server/container/guice/protocols/pop/src/main/java/org/apache/james/modules/protocols/POP3ServerModule.java
+++ b/server/container/guice/protocols/pop/src/main/java/org/apache/james/modules/protocols/POP3ServerModule.java
@@ -26,7 +26,6 @@ import org.apache.james.pop3server.netty.POP3ServerFactory;
 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;
@@ -58,7 +57,7 @@ public class POP3ServerModule extends AbstractModule {
                 pop3ServerFactory.configure(configurationProvider.getConfiguration("pop3server"));
                 pop3ServerFactory.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/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java
index db4bddc..8f9299d 100644
--- a/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java
+++ b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java
@@ -27,7 +27,6 @@ import org.apache.james.smtpserver.SendMailHandler;
 import org.apache.james.smtpserver.netty.SMTPServerFactory;
 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 SMTPServerModule extends AbstractModule {
                 smtpServerFactory.init();
                 sendMailHandler.init(null);
             } 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/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
index 94b763e..d0bb7f6 100644
--- a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
+++ b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
@@ -46,7 +46,6 @@ import org.apache.james.webadmin.utils.JsonTransformerModule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -140,7 +139,7 @@ public class WebAdminServerModule extends AbstractModule {
             try {
                 webAdminServer.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/jetty/src/main/java/org/apache/james/http/jetty/JettyHttpServer.java
----------------------------------------------------------------------
diff --git a/server/container/jetty/src/main/java/org/apache/james/http/jetty/JettyHttpServer.java b/server/container/jetty/src/main/java/org/apache/james/http/jetty/JettyHttpServer.java
index 7bb7ffa..8c33b92 100644
--- a/server/container/jetty/src/main/java/org/apache/james/http/jetty/JettyHttpServer.java
+++ b/server/container/jetty/src/main/java/org/apache/james/http/jetty/JettyHttpServer.java
@@ -35,7 +35,6 @@ import org.eclipse.jetty.servlet.ServletHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimaps;
 
@@ -117,7 +116,7 @@ public class JettyHttpServer implements Closeable {
         try {
             stop();
         } catch (Exception e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
----------------------------------------------------------------------
diff --git a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
index 5c56173..79d68db 100644
--- a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
+++ b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/MailboxManagerManagement.java
@@ -44,7 +44,6 @@ import org.slf4j.LoggerFactory;
 
 import com.github.steveash.guavate.Guavate;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 /**
  * JMX managmenent for Mailboxes
@@ -83,7 +82,7 @@ public class MailboxManagerManagement extends StandardMBean implements MailboxMa
         } catch (MailboxException e) {
             LOGGER.error("Error while remove mailboxes for user {}", username, e);
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(session);
         }
@@ -111,7 +110,7 @@ public class MailboxManagerManagement extends StandardMBean implements MailboxMa
         } catch (MailboxException e) {
             LOGGER.error("Error list mailboxes for user {}", username, e);
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(session);
         }
@@ -135,7 +134,7 @@ public class MailboxManagerManagement extends StandardMBean implements MailboxMa
                 .orElseThrow(() -> new MailboxException("mailbox name is probably empty"));
         } catch (Exception e) {
             LOGGER.error("Unable to create mailbox", e);
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             closeSession(session);
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/QuotaManagement.java
----------------------------------------------------------------------
diff --git a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/QuotaManagement.java b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/QuotaManagement.java
index 4e296f4..b557935 100644
--- a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/QuotaManagement.java
+++ b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/QuotaManagement.java
@@ -36,7 +36,6 @@ import org.apache.james.mailbox.store.mail.model.SerializableQuotaValue;
 import org.apache.james.util.MDCBuilder;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Throwables;
 
 public class QuotaManagement implements QuotaManagementMBean {
 
@@ -60,7 +59,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return quotaRootResolver.getQuotaRoot(new MailboxPath(namespace, user, name)).getValue();
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -73,7 +72,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuotaValue.valueOf(maxQuotaManager.getMaxMessage(quotaRootResolver.fromString(quotaRoot)));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -86,7 +85,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuotaValue.valueOf(maxQuotaManager.getMaxStorage(quotaRootResolver.fromString(quotaRoot)));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -99,7 +98,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuotaValue.valueOf(maxQuotaManager.getGlobalMaxMessage());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -112,7 +111,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuotaValue.valueOf(maxQuotaManager.getGlobalMaxStorage());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -129,7 +128,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                         maxQuotaManager.setMaxMessage(quotaRootResolver.fromString(quotaRoot), value))
                         .sneakyThrow());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -146,7 +145,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                         maxQuotaManager.setMaxStorage(quotaRootResolver.fromString(quotaRoot), value))
                         .sneakyThrow());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -161,7 +160,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                 .toValue(QuotaCount::count, QuotaCount.unlimited())
                 .ifPresent(Throwing.consumer(maxQuotaManager::setGlobalMaxMessage).sneakyThrow());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -176,7 +175,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                 .toValue(QuotaSize::size, QuotaSize.unlimited())
                 .ifPresent(Throwing.consumer(maxQuotaManager::setGlobalMaxStorage).sneakyThrow());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -189,7 +188,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuota.newInstance(quotaManager.getMessageQuota(quotaRootResolver.fromString(quotaRoot)));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -202,7 +201,7 @@ public class QuotaManagement implements QuotaManagementMBean {
                      .build()) {
             return SerializableQuota.newInstance(quotaManager.getStorageQuota(quotaRootResolver.fromString(quotaRoot)));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagement.java
----------------------------------------------------------------------
diff --git a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagement.java b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagement.java
index 468cf19..c5110a8 100644
--- a/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagement.java
+++ b/server/container/mailbox-adapter/src/main/java/org/apache/james/adapter/mailbox/ReIndexerManagement.java
@@ -30,8 +30,6 @@ import org.apache.james.mailbox.indexer.ReIndexer;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.util.MDCBuilder;
 
-import com.google.common.base.Throwables;
-
 public class ReIndexerManagement implements ReIndexerManagementMBean {
 
     private ReIndexer reIndexer;
@@ -50,7 +48,7 @@ public class ReIndexerManagement implements ReIndexerManagementMBean {
                      .build()) {
             reIndexer.reIndex(new MailboxPath(namespace, user, name));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -63,7 +61,7 @@ public class ReIndexerManagement implements ReIndexerManagementMBean {
                      .build()) {
             reIndexer.reIndex();
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/metrics/metrics-es-reporter/src/main/java/org/apache/james/metrics/es/ESMetricReporter.java
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-es-reporter/src/main/java/org/apache/james/metrics/es/ESMetricReporter.java b/server/container/metrics/metrics-es-reporter/src/main/java/org/apache/james/metrics/es/ESMetricReporter.java
index bc81cf8..d527c33 100644
--- a/server/container/metrics/metrics-es-reporter/src/main/java/org/apache/james/metrics/es/ESMetricReporter.java
+++ b/server/container/metrics/metrics-es-reporter/src/main/java/org/apache/james/metrics/es/ESMetricReporter.java
@@ -30,7 +30,6 @@ import org.elasticsearch.metrics.ElasticsearchReporter;
 
 import com.codahale.metrics.MetricRegistry;
 import com.codahale.metrics.ScheduledReporter;
-import com.google.common.base.Throwables;
 
 public class ESMetricReporter {
 
@@ -51,7 +50,7 @@ public class ESMetricReporter {
                     .index(esReporterConfiguration.getIndex())
                     .build());
             } catch (IOException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }   
         return Optional.empty();

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/util-java8/src/main/java/org/apache/james/util/MDCBuilder.java
----------------------------------------------------------------------
diff --git a/server/container/util-java8/src/main/java/org/apache/james/util/MDCBuilder.java b/server/container/util-java8/src/main/java/org/apache/james/util/MDCBuilder.java
index 7490d41..e6709c8 100644
--- a/server/container/util-java8/src/main/java/org/apache/james/util/MDCBuilder.java
+++ b/server/container/util-java8/src/main/java/org/apache/james/util/MDCBuilder.java
@@ -33,7 +33,6 @@ import org.slf4j.MDC;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 
@@ -52,7 +51,7 @@ public class MDCBuilder {
                 throw e;
             }
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/container/util/src/main/java/org/apache/james/util/concurrency/ConcurrentTestRunner.java
----------------------------------------------------------------------
diff --git a/server/container/util/src/main/java/org/apache/james/util/concurrency/ConcurrentTestRunner.java b/server/container/util/src/main/java/org/apache/james/util/concurrency/ConcurrentTestRunner.java
index 134c069..23fd57c 100644
--- a/server/container/util/src/main/java/org/apache/james/util/concurrency/ConcurrentTestRunner.java
+++ b/server/container/util/src/main/java/org/apache/james/util/concurrency/ConcurrentTestRunner.java
@@ -32,7 +32,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 public class ConcurrentTestRunner {
 
@@ -65,7 +64,7 @@ public class ConcurrentTestRunner {
                 }
             }
             if (exception != null) {
-                throw Throwables.propagate(exception);
+                throw new RuntimeException(exception);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java
----------------------------------------------------------------------
diff --git a/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java b/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java
index e4e5b95..6359743 100644
--- a/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java
+++ b/server/data/data-hbase/src/test/java/org/apache/james/rrt/hbase/HBaseStepdefs.java
@@ -29,8 +29,6 @@ import org.apache.james.rrt.lib.RewriteTablesStepdefs;
 import org.apache.james.system.hbase.TablePool;
 import org.apache.james.user.hbase.def.HUsersRepository;
 
-import com.google.common.base.Throwables;
-
 import cucumber.api.java.After;
 import cucumber.api.java.Before;
 
@@ -45,7 +43,7 @@ public class HBaseStepdefs {
             this.mainStepdefs = mainStepdefs;
             TablePool.getInstance(cluster.getConf());
         } catch (IOException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/data/data-jcr/src/test/java/org/apache/james/user/jcr/JcrUserRepositoryTest.java
----------------------------------------------------------------------
diff --git a/server/data/data-jcr/src/test/java/org/apache/james/user/jcr/JcrUserRepositoryTest.java b/server/data/data-jcr/src/test/java/org/apache/james/user/jcr/JcrUserRepositoryTest.java
index 6d33825..142cdd5 100644
--- a/server/data/data-jcr/src/test/java/org/apache/james/user/jcr/JcrUserRepositoryTest.java
+++ b/server/data/data-jcr/src/test/java/org/apache/james/user/jcr/JcrUserRepositoryTest.java
@@ -31,8 +31,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.xml.sax.InputSource;
 
-import com.google.common.base.Throwables;
-
 public class JcrUserRepositoryTest extends AbstractUsersRepositoryTest {
 
     private static final String JACKRABBIT_HOME = "target/jackrabbit";
@@ -66,7 +64,7 @@ public class JcrUserRepositoryTest extends AbstractUsersRepositoryTest {
         try {
             FileUtils.forceDelete(file);
         } catch (IOException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java
----------------------------------------------------------------------
diff --git a/server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java b/server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java
index f7f3a25..e8fddd4 100644
--- a/server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java
+++ b/server/data/data-library/src/main/java/org/apache/james/domainlist/lib/AbstractDomainList.java
@@ -38,7 +38,6 @@ import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Strings;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
 
@@ -102,7 +101,7 @@ public abstract class AbstractDomainList implements DomainList, Configurable {
                 LOGGER.info("Adding environment defined domain {}", envDomain);
                 addDomain(Domain.of(envDomain));
             } catch (DomainListException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/InMemoryDNSService.java
----------------------------------------------------------------------
diff --git a/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/InMemoryDNSService.java b/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/InMemoryDNSService.java
index 92fae2b..76f1148 100644
--- a/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/InMemoryDNSService.java
+++ b/server/dns-service/dnsservice-api/src/test/java/org/apache/james/dnsservice/api/InMemoryDNSService.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.function.Predicate;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Maps;
 import com.google.common.net.InetAddresses;
@@ -77,7 +76,7 @@ public class InMemoryDNSService implements DNSService {
         try {
             return hostRecord(hostname).mxRecords;
         } catch (UnknownHostException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -86,7 +85,7 @@ public class InMemoryDNSService implements DNSService {
         try {
             return hostRecord(hostname).txtRecords;
         } catch (UnknownHostException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -117,7 +116,7 @@ public class InMemoryDNSService implements DNSService {
         try {
             return getDNSEntry(filterByValue).getKey();
         } catch (UnknownHostException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/TemporaryJamesServer.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/TemporaryJamesServer.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/TemporaryJamesServer.java
index 192986a..e9d2f94 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/TemporaryJamesServer.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/TemporaryJamesServer.java
@@ -46,7 +46,6 @@ import org.apache.james.utils.GuiceProbe;
 import org.apache.james.webadmin.WebAdminConfiguration;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.inject.Module;
 
@@ -174,7 +173,7 @@ public class TemporaryJamesServer {
         try (OutputStream outputStream = new FileOutputStream(resourcesFolder.resolve(resourceName).toFile())) {
             IOUtils.copy(ClassLoader.getSystemClassLoader().getResource(resourceName).openStream(), outputStream);
         } catch (IOException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
index eb744e4..c117b8d 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/amqp/AmqpRule.java
@@ -28,7 +28,6 @@ import java.util.concurrent.TimeoutException;
 import org.apache.james.util.docker.SwarmGenericContainer;
 import org.junit.rules.ExternalResource;
 
-import com.google.common.base.Throwables;
 import com.jayway.awaitility.Awaitility;
 import com.rabbitmq.client.BuiltinExchangeType;
 import com.rabbitmq.client.Channel;
@@ -86,7 +85,7 @@ public class AmqpRule extends ExternalResource {
             channel.close();
             connection.close();
         } catch (Exception e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/SpecialAddress.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/SpecialAddress.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/SpecialAddress.java
index aae6405..dd1fe8f 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/SpecialAddress.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/SpecialAddress.java
@@ -22,8 +22,6 @@ package org.apache.james.transport.mailets.redirect;
 import org.apache.james.core.Domain;
 import org.apache.james.core.MailAddress;
 
-import com.google.common.base.Throwables;
-
 public class SpecialAddress {
 
     public static final MailAddress SENDER = AddressMarker.SENDER;
@@ -53,7 +51,7 @@ public class SpecialAddress {
             try {
                 return new MailAddress(kind.getValue(), domain);
             } catch (Exception e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailet/mailets/src/main/java/org/apache/james/transport/util/Patterns.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/util/Patterns.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/util/Patterns.java
index 3cd1cf8..bc4e4a3 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/util/Patterns.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/util/Patterns.java
@@ -3,15 +3,13 @@ package org.apache.james.transport.util;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
-import com.google.common.base.Throwables;
-
 public class Patterns {
 
     public static Pattern compilePatternUncheckedException(String pattern) {
         try {
             return Pattern.compile(pattern);
         } catch (PatternSyntaxException mpe) {
-            throw Throwables.propagate(mpe);
+            throw new RuntimeException(mpe);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/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 6a90d82..d130100 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
@@ -52,8 +52,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 
-import com.google.common.base.Throwables;
-
 @Deprecated
 public class ToRecipientFolderTest {
 
@@ -89,7 +87,7 @@ public class ToRecipientFolderTest {
         try {
             when(mailboxManager.createSystemSession(any(String.class))).thenReturn(session);
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
         when(session.getUser()).thenReturn(user);
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepository.java
----------------------------------------------------------------------
diff --git a/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepository.java b/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepository.java
index 9fd5d3f..774d904 100644
--- a/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepository.java
+++ b/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepository.java
@@ -46,7 +46,6 @@ import org.apache.james.util.FluentFutureStream;
 import org.apache.mailet.Mail;
 
 import com.github.fge.lambdas.Throwing;
-import com.google.common.base.Throwables;
 import com.google.common.primitives.Bytes;
 
 public class CassandraMailRepository implements MailRepository {
@@ -168,7 +167,7 @@ public class CassandraMailRepository implements MailRepository {
         try {
             return new MimeMessage(Session.getInstance(new Properties()), new ByteArrayInputStream(bytes));
         } catch (MessagingException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepositoryMailDAO.java
----------------------------------------------------------------------
diff --git a/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepositoryMailDAO.java b/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepositoryMailDAO.java
index a6fca3c..4a8fb04 100644
--- a/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepositoryMailDAO.java
+++ b/server/mailrepository/mailrepository-cassandra/src/main/java/org/apache/james/mailrepository/cassandra/CassandraMailRepositoryMailDAO.java
@@ -79,7 +79,6 @@ import com.datastax.driver.core.Session;
 import com.datastax.driver.core.UDTValue;
 import com.github.fge.lambdas.Throwing;
 import com.github.steveash.guavate.Guavate;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 
@@ -254,7 +253,7 @@ public class CassandraMailRepositoryMailDAO {
             new ObjectOutputStream(outputStream).writeObject(serializable);
             return ByteBuffer.wrap(outputStream.toByteArray());
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -265,7 +264,7 @@ public class CassandraMailRepositoryMailDAO {
             ObjectInputStream objectInputStream = new ObjectInputStream(new ByteArrayInputStream(data));
             return (Serializable) objectInputStream.readObject();
         } catch (IOException | ClassNotFoundException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -273,7 +272,7 @@ public class CassandraMailRepositoryMailDAO {
         try {
             return new MailAddress(rawValue);
         } catch (AddressException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/DefaultMailboxesProvisioningFilter.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/DefaultMailboxesProvisioningFilter.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/DefaultMailboxesProvisioningFilter.java
index aa6099f..4ddbfb9 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/DefaultMailboxesProvisioningFilter.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/DefaultMailboxesProvisioningFilter.java
@@ -45,7 +45,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Throwables;
 
 public class DefaultMailboxesProvisioningFilter implements Filter {
 
@@ -65,7 +64,7 @@ public class DefaultMailboxesProvisioningFilter implements Filter {
     }
     
     @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
+    public void init(FilterConfig filterConfig) {
     }
     
     @Override
@@ -82,7 +81,7 @@ public class DefaultMailboxesProvisioningFilter implements Filter {
             User user = session.getUser();
             createDefaultMailboxes(user);
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             timeMetric.stopAndPublish();
         }
@@ -100,7 +99,7 @@ public class DefaultMailboxesProvisioningFilter implements Filter {
         try {
             return !mailboxManager.mailboxExists(mailboxPath, session);
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -118,7 +117,7 @@ public class DefaultMailboxesProvisioningFilter implements Filter {
         } catch (MailboxExistsException e) {
             LOGGER.info("Mailbox {} have been created concurrently", mailboxPath);
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServlet.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServlet.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServlet.java
index c1f1fea..c519a88 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServlet.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServlet.java
@@ -46,7 +46,6 @@ import com.fasterxml.jackson.core.JsonParser.Feature;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Throwables;
 
 public class JMAPServlet extends HttpServlet {
 
@@ -95,7 +94,7 @@ public class JMAPServlet extends HttpServlet {
         try {
             return requestHandler.handle(request);
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/UserProvisioningFilter.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/UserProvisioningFilter.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/UserProvisioningFilter.java
index 5898fb7..b52d649 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/UserProvisioningFilter.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/UserProvisioningFilter.java
@@ -41,7 +41,6 @@ import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Throwables;
 
 public class UserProvisioningFilter implements Filter {
 
@@ -78,7 +77,7 @@ public class UserProvisioningFilter implements Filter {
         } catch (AlreadyExistInUsersRepositoryException e) {
             // Ignore
         } catch (UsersRepositoryException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } finally {
             timeMetric.stopAndPublish();
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
index efe279a..e90b912 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/AccessTokenManagerImpl.java
@@ -29,7 +29,6 @@ import org.apache.james.jmap.api.access.AccessTokenRepository;
 import org.apache.james.jmap.api.access.exceptions.InvalidAccessToken;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 public class AccessTokenManagerImpl implements AccessTokenManager {
 
@@ -56,7 +55,7 @@ public class AccessTokenManagerImpl implements AccessTokenManager {
             if (completionException.getCause() instanceof InvalidAccessToken) {
                 throw (InvalidAccessToken) completionException.getCause();
             } else {
-                throw Throwables.propagate(completionException);
+                throw new RuntimeException(completionException);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
index 4224c08..5ba69b9 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/crypto/JamesSignatureHandler.java
@@ -39,7 +39,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 public class JamesSignatureHandler implements SignatureHandler {
 
@@ -84,7 +83,7 @@ public class JamesSignatureHandler implements SignatureHandler {
             javaSignature.update(source.getBytes());
             return new Base64().encodeAsString(javaSignature.sign());
         } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -98,7 +97,7 @@ public class JamesSignatureHandler implements SignatureHandler {
             javaSignature.update(source.getBytes());
             return javaSignature.verify(new Base64().decode(signature));
         } catch (NoSuchAlgorithmException | InvalidKeyException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         } catch (SignatureException e) {
             LOGGER.warn("Attempt to use a malformed signature '{}' for source '{}'", signature, source, e);
             return false;

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/event/PropagateLookupRightListener.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/event/PropagateLookupRightListener.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/event/PropagateLookupRightListener.java
index 44734dc..2a98128 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/event/PropagateLookupRightListener.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/event/PropagateLookupRightListener.java
@@ -36,8 +36,6 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 public class PropagateLookupRightListener implements MailboxListener {
     private static final Logger LOGGER = LoggerFactory.getLogger(PropagateLookupRightListener.class);
 
@@ -86,7 +84,7 @@ public class PropagateLookupRightListener implements MailboxListener {
                             .map(entry -> new Entry(entry.getKey(), entry.getValue()))
                     ));
         } catch (MailboxException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/MultipleClassesDeserializer.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/MultipleClassesDeserializer.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/MultipleClassesDeserializer.java
index 3fdf41e..d06f448 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/MultipleClassesDeserializer.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/json/MultipleClassesDeserializer.java
@@ -30,7 +30,6 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 public class MultipleClassesDeserializer extends StdDeserializer<Object> {
 
@@ -56,7 +55,7 @@ public class MultipleClassesDeserializer extends StdDeserializer<Object> {
         try {
             return mapper.treeToValue(root, clazz);
         } catch (JsonProcessingException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java
index 9b281bf..c27ff9b 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMailboxesMethod.java
@@ -46,7 +46,6 @@ import org.apache.james.util.OptionalUtils;
 import com.github.fge.lambdas.Throwing;
 import com.google.common.annotations.VisibleForTesting;
 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.Sets;
@@ -113,7 +112,7 @@ public class GetMailboxesMethod implements Method {
                 .forEach(builder::add);
             return builder.build();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java
index c849ef0..a720a02 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessageListMethod.java
@@ -50,7 +50,6 @@ import org.apache.james.util.MDCBuilder;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 public class GetMessageListMethod implements Method {
 
@@ -134,7 +133,7 @@ public class GetMessageListMethod implements Method {
                 .forEach(builder::messageId);
             return builder.build();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java
index b7415bd..7c7f066 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/GetMessagesMethod.java
@@ -56,7 +56,6 @@ import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableSet;
 
 public class GetMessagesMethod implements Method {
@@ -147,7 +146,7 @@ public class GetMessagesMethod implements Method {
                 .expectedMessageIds(getMessagesRequest.getIds())
                 .build();
         } catch (MailboxException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
index a994577..24ac9c1 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java
@@ -61,7 +61,6 @@ import org.slf4j.LoggerFactory;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Splitter;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
@@ -112,7 +111,7 @@ public class MIMEMessageConverter {
         try {
             return DefaultMessageWriter.asBytes(message);
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -217,7 +216,7 @@ public class MIMEMessageConverter {
             }
         } catch (IOException e) {
             LOGGER.error("Error while creating textBody \n{}\n or htmlBody \n{}", newMessage.getTextBody().get(), newMessage.getHtmlBody().get(), e);
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -264,7 +263,7 @@ public class MIMEMessageConverter {
                 builder.addBodyPart(attachmentBodyPart(att));
             } catch (IOException e) {
                 LOGGER.error("Error while creating attachment", e);
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/UpdateMessagePatchConverter.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/UpdateMessagePatchConverter.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/UpdateMessagePatchConverter.java
index a4353cc..a1297f1 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/UpdateMessagePatchConverter.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/UpdateMessagePatchConverter.java
@@ -28,7 +28,6 @@ import org.apache.james.jmap.model.UpdateMessagePatch;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Throwables;
 
 public class UpdateMessagePatchConverter {
 
@@ -54,7 +53,7 @@ public class UpdateMessagePatchConverter {
         try {
             return jsonParser.readerFor(UpdateMessagePatch.class).<UpdateMessagePatch>readValue(updatePatchNode);
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Emailer.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Emailer.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Emailer.java
index 5789939..5c46bb2 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Emailer.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/Emailer.java
@@ -35,7 +35,6 @@ import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 
 @JsonDeserialize(builder = Emailer.Builder.class)
 public class Emailer {
@@ -133,7 +132,7 @@ public class Emailer {
             return new MailAddress(email.get());
         } catch (AddressException e) {
             LOGGER.error("Invalid mail address", email);
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/MailboxFactory.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/MailboxFactory.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/MailboxFactory.java
index 22bcd41..afac80c 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/MailboxFactory.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/MailboxFactory.java
@@ -49,7 +49,6 @@ import org.apache.james.mailbox.quota.QuotaValue;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Splitter;
-import com.google.common.base.Throwables;
 
 public class MailboxFactory {
     public static final boolean NO_RESET_RECENT = false;
@@ -92,7 +91,7 @@ public class MailboxFactory {
             } catch (MailboxNotFoundException e) {
                 return Optional.empty();
             } catch (MailboxException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/jmap/src/test/java/org/apache/james/jmap/mailet/VacationReplyTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/mailet/VacationReplyTest.java b/server/protocols/jmap/src/test/java/org/apache/james/jmap/mailet/VacationReplyTest.java
index de313a2..ae25317 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/mailet/VacationReplyTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/mailet/VacationReplyTest.java
@@ -41,8 +41,6 @@ import org.hamcrest.Description;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Throwables;
-
 public class VacationReplyTest {
 
     public static final String REASON = "I am in vacation dudes ! (plain text)";
@@ -140,7 +138,7 @@ public class VacationReplyTest {
                 try {
                     return mimeMessage.getSubject().equals(expectedSubject);
                 } catch (MessagingException e) {
-                    throw Throwables.propagate(e);
+                    throw new RuntimeException(e);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/SenderAuthIdentifyVerificationRcptHook.java
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/SenderAuthIdentifyVerificationRcptHook.java b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/SenderAuthIdentifyVerificationRcptHook.java
index 5cfb7f1..d496c4d 100644
--- a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/SenderAuthIdentifyVerificationRcptHook.java
+++ b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/SenderAuthIdentifyVerificationRcptHook.java
@@ -32,8 +32,6 @@ import org.apache.james.protocols.smtp.hook.HookResult;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;
 
-import com.google.common.base.Throwables;
-
 /**
  * Handler which check if the authenticated user is incorrect
  */
@@ -86,7 +84,7 @@ public class SenderAuthIdentifyVerificationRcptHook extends AbstractSenderAuthId
         try {
             return users.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/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
index 486b0b8..8964c87 100644
--- a/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
+++ b/server/protocols/webadmin/webadmin-core/src/test/java/org/apache/james/webadmin/routes/TasksRoutesTest.java
@@ -44,7 +44,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import com.google.common.base.Throwables;
 import com.jayway.restassured.RestAssured;
 
 public class TasksRoutesTest {
@@ -107,7 +106,7 @@ public class TasksRoutesTest {
         try {
             new CountDownLatch(1).await();
         } catch (InterruptedException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -178,7 +177,7 @@ public class TasksRoutesTest {
             try {
                 Thread.sleep(100);
             } catch (InterruptedException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
             return Task.Result.COMPLETED;
         });

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/DomainQuotaRoutes.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/DomainQuotaRoutes.java b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/DomainQuotaRoutes.java
index 3360c23..7fedff1 100644
--- a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/DomainQuotaRoutes.java
+++ b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/routes/DomainQuotaRoutes.java
@@ -49,8 +49,6 @@ import org.apache.james.webadmin.utils.JsonTransformerModule;
 import org.apache.james.webadmin.validation.Quotas;
 import org.eclipse.jetty.http.HttpStatus;
 
-import com.google.common.base.Throwables;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -106,7 +104,7 @@ public class DomainQuotaRoutes implements Routes {
         try {
             return usersRepository.supportVirtualHosting();
         } catch (UsersRepositoryException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java
----------------------------------------------------------------------
diff --git a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java
index 132e36c..4dfc43e 100644
--- a/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java
+++ b/server/protocols/webadmin/webadmin-mailrepository/src/main/java/org/apache/james/webadmin/service/ClearMailRepositoryTask.java
@@ -28,8 +28,6 @@ import org.apache.james.mailrepository.api.MailRepository;
 import org.apache.james.task.Task;
 import org.apache.james.task.TaskExecutionDetails;
 
-import com.google.common.base.Throwables;
-
 public class ClearMailRepositoryTask implements Task {
 
     public static final String TYPE = "clearMailRepository";
@@ -91,7 +89,7 @@ public class ClearMailRepositoryTask implements Task {
         try {
             return mailRepository.size();
         } catch (MessagingException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
index ceeada6..14457da 100644
--- a/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
+++ b/server/queue/queue-activemq/src/main/java/org/apache/james/queue/activemq/EmbeddedActiveMQ.java
@@ -35,8 +35,6 @@ import org.apache.james.filesystem.api.FileSystem;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 public class EmbeddedActiveMQ {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(EmbeddedActiveMQ.class);
@@ -58,7 +56,7 @@ public class EmbeddedActiveMQ {
             persistenceAdapter.setDirectory(fileSystem.getFile(KAHADB_STORE_LOCATION));
             launchEmbeddedBroker(fileSystem);
         } catch (Exception e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
         activeMQConnectionFactory = createActiveMQConnectionFactory(createBlobTransferPolicy(fileSystem));
     }


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