X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Futil%2Fosgi%2FNetconfConfigUtil.java;h=64537f336fc96ce49408a02633c0d761cf813cec;hb=dc30e36dcdd472c68ad77853b615740a133521ce;hp=cd74911138a86e5e09b508588d334458632a0a3c;hpb=24b4a224a27ab2d12f1fe16bb0e2683403064931;p=netconf.git diff --git a/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/osgi/NetconfConfigUtil.java b/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/osgi/NetconfConfigUtil.java index cd74911138..64537f336f 100644 --- a/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/osgi/NetconfConfigUtil.java +++ b/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/osgi/NetconfConfigUtil.java @@ -9,7 +9,6 @@ package org.opendaylight.netconf.util.osgi; import java.util.Collection; -import java.util.Optional; import org.osgi.framework.BundleContext; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; @@ -30,11 +29,11 @@ public final class NetconfConfigUtil { final Collection> serviceReferences = bundleContext.getServiceReferences(ManagedService.class, null); for (final ServiceReference serviceReference : serviceReferences) { - ManagedService service = bundleContext.getService(serviceReference); - if (service instanceof NetconfConfiguration){ - LOG.debug("Netconf configuration service found"); - return (NetconfConfiguration) service; - } + ManagedService service = bundleContext.getService(serviceReference); + if (service instanceof NetconfConfiguration) { + LOG.debug("Netconf configuration service found"); + return (NetconfConfiguration) service; + } } throw new IllegalStateException("Netconf configuration service not found");