Bug 8153: Enforce check-style rules for netconf - netconf-util
[netconf.git] / netconf / netconf-util / src / main / java / org / opendaylight / netconf / util / osgi / NetconfConfigUtil.java
index cd74911138a86e5e09b508588d334458632a0a3c..64537f336fc96ce49408a02633c0d761cf813cec 100644 (file)
@@ -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<ServiceReference<ManagedService>> serviceReferences
                 = bundleContext.getServiceReferences(ManagedService.class, null);
         for (final ServiceReference<ManagedService> 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");