From 5c705caf17594720a38c67d23549dfad3cc4c894 Mon Sep 17 00:00:00 2001 From: Matthew Horridge Date: Wed, 20 Mar 2024 12:24:52 -0700 Subject: [PATCH] Updated RabbitMqConfiguration - Narrowed exceptions caught to be more specific (Instead of catching Exception, catching IOException and TimeoutException). - Set default value for handlers to be an empty array --- .../protege/webprotege/ipc/impl/RabbitMqConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/stanford/protege/webprotege/ipc/impl/RabbitMqConfiguration.java b/src/main/java/edu/stanford/protege/webprotege/ipc/impl/RabbitMqConfiguration.java index aaecc87..a4cea42 100644 --- a/src/main/java/edu/stanford/protege/webprotege/ipc/impl/RabbitMqConfiguration.java +++ b/src/main/java/edu/stanford/protege/webprotege/ipc/impl/RabbitMqConfiguration.java @@ -62,7 +62,7 @@ public class RabbitMqConfiguration { @Autowired(required = false) - private List> handlers; + private List> handlers = new ArrayList<>(); @Autowired @@ -188,7 +188,7 @@ public void createBindings() { } channel.queueBind(getCommandResponseQueue(), COMMANDS_EXCHANGE, getCommandResponseQueue()); - } catch (Exception e) { + } catch (IOException |TimeoutException e) { logger.error("Error initialize bindings", e); } }