You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/01/24 09:49:45 UTC

[3/4] james-project git commit: MAILET-149 Factorize exception handling in Amqp Junit rule

MAILET-149 Factorize exception handling in Amqp Junit rule


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

Branch: refs/heads/master
Commit: 84ecf060147204f1b3c0a1688bb73a87f933fbc2
Parents: 65cf1c8
Author: Benoit Tellier <bt...@linagora.com>
Authored: Tue Jan 24 08:48:00 2017 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Tue Jan 24 16:49:07 2017 +0700

----------------------------------------------------------------------
 .../java/org/apache/james/transport/mailets/amqp/AmqpRule.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/84ecf060/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 08e831f..3923fc9 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
@@ -102,9 +102,7 @@ public class AmqpRule extends ExternalResource {
     private boolean isReady(ConnectionFactory factory) {
         try (Connection connection = factory.newConnection()) {
             return true;
-        } catch (IOException e) {
-            return false;
-        } catch (TimeoutException e) {
+        } catch (IOException | TimeoutException e) {
             return false;
         }
     }


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