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 <[email protected]> Authored: Tue Jan 24 08:48:00 2017 +0700 Committer: Benoit Tellier <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
