From: Colin Dixon Date: Tue, 2 Apr 2013 20:31:19 +0000 (-0500) Subject: Partial fix for bug 8. Fixing many generics-related warnings and some typos. X-Git-Tag: releasepom-0.1.0~607^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=ee829bb84c3488d19f9221de2814ea6e3f2e7186 Partial fix for bug 8. Fixing many generics-related warnings and some typos. Change-Id: I8cfe05dacbdc3a6e7875a0661b9e1cdb5a18f67e Signed-off-by: Colin Dixon --- diff --git a/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterManager.java b/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterManager.java index 632f550ffe..058c616ad8 100644 --- a/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterManager.java +++ b/opendaylight/clustering/services_implementation/src/main/java/org/opendaylight/controller/clustering/services_implementation/internal/ClusterManager.java @@ -62,7 +62,7 @@ public class ClusterManager implements IClusterServices { .getLogger(ClusterManager.class); private DefaultCacheManager cm; GossipRouter gossiper; - private HashSet roleChangeListeners; + private HashSet roleChangeListeners; private ViewChangedListener cacheManagerListener; private static String loopbackAddress = "127.0.0.1"; @@ -97,10 +97,10 @@ public class ClusterManager implements IClusterServices { if (supernodes.hasMoreTokens()) { // Populate the list of my addresses try { - Enumeration e = NetworkInterface.getNetworkInterfaces(); + Enumeration e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface n = (NetworkInterface) e.nextElement(); - Enumeration ee = n.getInetAddresses(); + Enumeration ee = n.getInetAddresses(); while (ee.hasMoreElements()) { InetAddress i = (InetAddress) ee.nextElement(); myAddresses.add(i); @@ -289,7 +289,7 @@ public class ClusterManager implements IClusterServices { String cacheName, Set cMode) throws CacheExistException, CacheConfigException { EmbeddedCacheManager manager = this.cm; - Cache c; + Cache c; String realCacheName = "{" + containerName + "}_{" + cacheName + "}"; if (manager == null) { return null; @@ -322,7 +322,7 @@ public class ClusterManager implements IClusterServices { @Override public ConcurrentMap getCache(String containerName, String cacheName) { EmbeddedCacheManager manager = this.cm; - Cache c; + Cache c; String realCacheName = "{" + containerName + "}_{" + cacheName + "}"; if (manager == null) { return null; @@ -359,7 +359,7 @@ public class ClusterManager implements IClusterServices { @Override public Set getCacheList(String containerName) { - Set perContainerCaches = new HashSet(); + Set perContainerCaches = new HashSet(); EmbeddedCacheManager manager = this.cm; if (manager == null) { return null; @@ -403,7 +403,7 @@ public class ClusterManager implements IClusterServices { public void addListener(String containerName, String cacheName, IGetUpdates u) throws CacheListenerAddException { EmbeddedCacheManager manager = this.cm; - Cache c; + Cache c; String realCacheName = "{" + containerName + "}_{" + cacheName + "}"; if (manager == null) { return; @@ -422,7 +422,7 @@ public class ClusterManager implements IClusterServices { public Set> getListeners(String containerName, String cacheName) { EmbeddedCacheManager manager = this.cm; - Cache c; + Cache c; String realCacheName = "{" + containerName + "}_{" + cacheName + "}"; if (manager == null) { return null; @@ -433,7 +433,7 @@ public class ClusterManager implements IClusterServices { } c = manager.getCache(realCacheName); - Set> res = new HashSet(); + Set> res = new HashSet>(); Set listeners = c.getListeners(); for (Object listener : listeners) { if (listener instanceof CacheListenerContainer) { @@ -449,7 +449,7 @@ public class ClusterManager implements IClusterServices { public void removeListener(String containerName, String cacheName, IGetUpdates u) { EmbeddedCacheManager manager = this.cm; - Cache c; + Cache c; String realCacheName = "{" + containerName + "}_{" + cacheName + "}"; if (manager == null) { return; @@ -536,7 +536,7 @@ public class ClusterManager implements IClusterServices { EmbeddedCacheManager manager = this.cm; if (manager == null) { // In case we cannot fetch the information, lets assume we - // are standby, so to have less responsability. + // are standby, so to have less responsibility. return true; } return (!manager.isCoordinator()); @@ -546,7 +546,7 @@ public class ClusterManager implements IClusterServices { EmbeddedCacheManager manager = this.cm; if ((manager == null) || (a == null)) { // In case we cannot fetch the information, lets assume we - // are standby, so to have less responsability. + // are standby, so to have less responsibility. return null; } Transport t = manager.getTransport(); @@ -600,7 +600,7 @@ public class ClusterManager implements IClusterServices { EmbeddedCacheManager manager = this.cm; if (manager == null) { // In case we cannot fetch the information, lets assume we - // are standby, so to have less responsability. + // are standby, so to have less responsibility. return null; } @@ -613,12 +613,12 @@ public class ClusterManager implements IClusterServices { EmbeddedCacheManager manager = this.cm; if (manager == null) { // In case we cannot fetch the information, lets assume we - // are standby, so to have less responsability. + // are standby, so to have less responsibility. throw new ListenRoleChangeAddException(); } if (this.roleChangeListeners == null) { - this.roleChangeListeners = new HashSet(); + this.roleChangeListeners = new HashSet(); this.cacheManagerListener = new ViewChangedListener( this.roleChangeListeners); manager.addListener(this.cacheManagerListener); @@ -634,7 +634,7 @@ public class ClusterManager implements IClusterServices { EmbeddedCacheManager manager = this.cm; if (manager == null) { // In case we cannot fetch the information, lets assume we - // are standby, so to have less responsability. + // are standby, so to have less responsibility. return; }