james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/4] james-project git commit: JAMES-2377 Stop using Throwables::propagate
Date Tue, 05 Jun 2018 02:08:02 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
b/server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
index 0a66b43..b8a1cd3 100644
--- a/server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
+++ b/server/queue/queue-activemq/src/test/java/org/apache/james/queue/activemq/ActiveMQMailQueueBlobTest.java
@@ -45,8 +45,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Throwables;
-
 @ExtendWith(BrokerExtension.class)
 @Tag(BrokerExtension.STATISTICS)
 public class ActiveMQMailQueueBlobTest implements DelayedManageableMailQueueContract, DelayedPriorityMailQueueContract,
PriorityManageableMailQueueContract {
@@ -181,7 +179,7 @@ public class ActiveMQMailQueueBlobTest implements DelayedManageableMailQueueCont
             } catch (FileNotFoundException e) {
                 LOGGER.info("No file specified");
             } catch (IOException e) {
-                Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
b/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
index 19a4fe4..8386731 100644
--- a/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
+++ b/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
@@ -67,7 +67,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.threeten.extra.Temporals;
 
-import com.google.common.base.Throwables;
 import com.google.common.collect.Iterators;
 
 /**
@@ -153,7 +152,7 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
             connection = connectionFactory.createConnection();
             connection.start();
         } catch (JMSException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
         this.mailQueueItemDecoratorFactory = mailQueueItemDecoratorFactory;
         this.queueName = queueName;
@@ -166,7 +165,7 @@ public class JMSMailQueue implements ManageableMailQueue, JMSSupport,
MailPriori
             queue = session.createQueue(queueName);
             producer = session.createProducer(queue);
         } catch (JMSException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/8b422da3/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
----------------------------------------------------------------------
diff --git a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
index 0b7005a..cec818b 100644
--- a/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
+++ b/server/task/src/test/java/org/apache/james/task/MemoryTaskManagerTest.java
@@ -36,7 +36,6 @@ import org.junit.Test;
 
 import com.github.fge.lambdas.Throwing;
 import com.github.fge.lambdas.consumers.ConsumerChainer;
-import com.google.common.base.Throwables;
 
 public class MemoryTaskManagerTest {
 
@@ -420,7 +419,7 @@ public class MemoryTaskManagerTest {
         try {
             Thread.sleep(durationInMs);
         } catch (InterruptedException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 
@@ -428,7 +427,7 @@ public class MemoryTaskManagerTest {
         try {
             countDownLatch.await();
         } catch (InterruptedException e) {
-            Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }
 }
\ No newline at end of file


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