diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-08-31 15:16:38 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-08-31 15:39:43 +0200 |
commit | d41b116f0a177683a326a9d18c4f6aa1ece651de (patch) | |
tree | e41057bb035c7ea6762e27f48224ac4822bcd00b /infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf | |
parent | 7567ab4670f6cdf44e227ab8d547414a755401df (diff) |
Fixing sonar issues #1
Change-Id: I4c27d0ad2fd1655db2237ae914361f029093084c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf')
2 files changed, 5 insertions, 3 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java index 53be6b5d9..0b3be9f1f 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfSshServerProvider.java @@ -18,6 +18,7 @@ package io.fd.honeycomb.infra.distro.netconf; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.inject.Inject; +import io.fd.honeycomb.infra.distro.InitializationException; import io.fd.honeycomb.infra.distro.ProviderTrait; import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import io.netty.channel.ChannelFuture; @@ -137,12 +138,12 @@ public final class NetconfSshServerProvider extends ProviderTrait<NetconfSshServ sshProxyServer.bind(sshConfigBuilder.createSshProxyServerConfiguration()); LOG.info("Netconf SSH endpoint started successfully at {}", bindingAddress); } catch (final IOException e) { - throw new RuntimeException("Unable to start SSH netconf server", e); + throw new InitializationException("Unable to start SSH netconf server", e); } } else { LOG.warn("Unable to start SSH netconf server at {}", bindingAddress, future.cause()); - throw new RuntimeException("Unable to start SSH netconf server", future.cause()); + throw new InitializationException("Unable to start SSH netconf server", future.cause()); } } diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfTcpServerProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfTcpServerProvider.java index d6ab47446..66b82eed9 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfTcpServerProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfTcpServerProvider.java @@ -17,6 +17,7 @@ package io.fd.honeycomb.infra.distro.netconf; import com.google.inject.Inject; +import io.fd.honeycomb.infra.distro.InitializationException; import io.fd.honeycomb.infra.distro.ProviderTrait; import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration; import io.netty.channel.ChannelFuture; @@ -78,7 +79,7 @@ public final class NetconfTcpServerProvider extends ProviderTrait<NetconfTcpServ LOG.info("Netconf TCP endpoint started successfully at {}", unresolved); } else { LOG.warn("Unable to start TCP netconf server at {}", unresolved, future.cause()); - throw new RuntimeException("Unable to start TCP netconf server", future.cause()); + throw new InitializationException("Unable to start TCP netconf server", future.cause()); } } } |