From: Robert Varga Date: Fri, 7 Nov 2014 18:30:26 +0000 (+0100) Subject: Fix raw ServiceReferences and ServiceRegistrations X-Git-Tag: release/lithium~871^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=7cf119bd5518268c40005b68f1b82c5730763ba9 Fix raw ServiceReferences and ServiceRegistrations Adding a windcard is enough to reduce the number of eclipse warnings. Change-Id: I060ce96e2eb4cc6c6ed0e2bf87daabacc33b2d3f Signed-off-by: Robert Varga --- diff --git a/opendaylight/adsal/switchmanager/integrationtest/src/test/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerIT.java b/opendaylight/adsal/switchmanager/integrationtest/src/test/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerIT.java index 64098ec515..3963abf265 100644 --- a/opendaylight/adsal/switchmanager/integrationtest/src/test/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerIT.java +++ b/opendaylight/adsal/switchmanager/integrationtest/src/test/java/org/opendaylight/controller/switchmanager/internal/SwitchManagerIT.java @@ -155,7 +155,7 @@ public class SwitchManagerIT { assertFalse(debugit); // Now lets create a hosttracker for testing purpose - ServiceReference s = bc.getServiceReference(ISwitchManager.class + ServiceReference s = bc.getServiceReference(ISwitchManager.class .getName()); if (s != null) { this.switchManager = (ISwitchManager) bc.getService(s); diff --git a/opendaylight/adsal/topologymanager/integrationtest/src/test/java/org/opendaylight/controller/topologymanager/TopologyManagerIT.java b/opendaylight/adsal/topologymanager/integrationtest/src/test/java/org/opendaylight/controller/topologymanager/TopologyManagerIT.java index 08934f32c7..c2fc8aaa8e 100644 --- a/opendaylight/adsal/topologymanager/integrationtest/src/test/java/org/opendaylight/controller/topologymanager/TopologyManagerIT.java +++ b/opendaylight/adsal/topologymanager/integrationtest/src/test/java/org/opendaylight/controller/topologymanager/TopologyManagerIT.java @@ -159,7 +159,7 @@ public class TopologyManagerIT { Set properties = new HashSet(); - ServiceReference r = bc.getServiceReference(IPluginInTopologyService.class + ServiceReference r = bc.getServiceReference(IPluginInTopologyService.class .getName()); TopologyServices topologyServices = null; if (r != null) { diff --git a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/Activator.java b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/Activator.java index 3ba92b092e..99f9c04fcc 100644 --- a/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/Activator.java +++ b/opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/Activator.java @@ -29,7 +29,7 @@ public class Activator implements BundleActivator { private static final Logger logger = LoggerFactory.getLogger(Activator.class); private BundleContext context; - private ServiceRegistration osgiRegistration; + private ServiceRegistration osgiRegistration; private ConfigRegistryLookupThread configRegistryLookup = null; @Override diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivatorTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivatorTest.java index 9470e6d09c..fd9295a4b3 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivatorTest.java +++ b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfImplActivatorTest.java @@ -34,9 +34,9 @@ public class NetconfImplActivatorTest { @Mock private Filter filter; @Mock - private ServiceReference reference; + private ServiceReference reference; @Mock - private ServiceRegistration registration; + private ServiceRegistration registration; @Before public void setUp() throws Exception { @@ -44,7 +44,7 @@ public class NetconfImplActivatorTest { doReturn(filter).when(bundle).createFilter(anyString()); doNothing().when(bundle).addServiceListener(any(ServiceListener.class), anyString()); - ServiceReference[] refs = new ServiceReference[0]; + ServiceReference[] refs = new ServiceReference[0]; doReturn(refs).when(bundle).getServiceReferences(anyString(), anyString()); doReturn(Arrays.asList(refs)).when(bundle).getServiceReferences(any(Class.class), anyString()); doReturn("").when(bundle).getProperty(anyString()); diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java index 374e8aeb9f..0d7158aa21 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java +++ b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java @@ -32,7 +32,7 @@ public class NetconfOperationServiceFactoryTrackerTest { @Mock private NetconfOperationServiceFactory factory; @Mock - private ServiceReference reference; + private ServiceReference reference; private NetconfOperationServiceFactoryTracker tracker;