X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fosgi%2FNetconfConfigUtil.java;h=c77e0d7da25dc112e54489fbae42bf317a3f2b3f;hp=333fea3493172286fdba2c807eff105760741411;hb=b3e553ce5b3d3e972cbe19465ab7af2fcb39934c;hpb=2c4a9be1a89caa93f4f2697401771dcb0fa67c5a diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java index 333fea3493..c77e0d7da2 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/osgi/NetconfConfigUtil.java @@ -53,29 +53,6 @@ public final class NetconfConfigUtil { } } - /** - * Get extracted address or default. - * - * @throws java.lang.IllegalStateException if neither address is present. - */ - private static InetSocketAddress getNetconfAddress(final InetSocketAddress defaultAddress, Optional extractedAddress, InfixProp infix) { - InetSocketAddress inetSocketAddress; - - if (extractedAddress.isPresent() == false) { - logger.debug("Netconf {} address not found, falling back to default {}", infix, defaultAddress); - - if (defaultAddress == null) { - logger.warn("Netconf {} address not found, default address not provided", infix); - throw new IllegalStateException("Netconf " + infix + " address not found, default address not provided"); - } - inetSocketAddress = defaultAddress; - } else { - inetSocketAddress = extractedAddress.get(); - } - - return inetSocketAddress; - } - public static String getPrivateKeyPath(final BundleContext context) { return getPropertyValue(context, getPrivateKeyKey()); }