fixing warnings 29/229/1
authorColin Dixon <ckd@us.ibm.com>
Thu, 11 Apr 2013 22:26:37 +0000 (15:26 -0700)
committerColin Dixon <ckd@us.ibm.com>
Tue, 23 Apr 2013 19:02:43 +0000 (14:02 -0500)
Change-Id: Iae2f073fb9733d0b1bdedd2aa05815fc25063e9a
Signed-off-by: Colin Dixon <ckd@us.ibm.com>
opendaylight/clustering/services/src/main/java/org/opendaylight/controller/clustering/services/IClusterServices.java
opendaylight/clustering/stub/src/main/java/org/opendaylight/controller/clustering/stub/internal/ClusterManagerCommon.java
opendaylight/clustering/test/src/main/java/org/opendaylight/controller/clustering/test/internal/SimpleClient.java
opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/HostTracker.java
opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/hostAware/HostNodeConnector.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerServiceDependency.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/NodeConnector.java
opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java

index 031434f8e8a5c9cea37695b32c79b4e56a746b87..68960baa07a0d157b1c101fbdb6832208e54376c 100644 (file)
@@ -118,7 +118,7 @@ public interface IClusterServices {
      *
      * @return ConcurrentHashMap to be used to modify the data structure
      */
-    ConcurrentMap<?, ?> getCache(String containerName, String cacheName);
+    ConcurrentMap<? extends Object, ? extends Object> getCache(String containerName, String cacheName);
 
     /**
      * Destroy a cachename given containerName/cachename, if doesn't exist
index 13d05bb7be900d3fd8bc8c71f3bce8f2018f87c6..6fa0d6e96ec3b07884c1cc4bb4d80ee5af20f0a3 100644 (file)
@@ -88,7 +88,7 @@ abstract public class ClusterManagerCommon implements IClusterServicesCommon {
             CacheConfigException {
         ConcurrentMap<?, ?> res = this.caches.get(cacheName);
         if (res == null) {
-            res = new ConcurrentHashMap();
+            res = new ConcurrentHashMap<Object, Object>();
             this.caches.put(cacheName, res);
             return res;
         }
index 3e9717fa62a751744d9a9f9633b2925a0cb72faa..b6ab95db33fff81260879bb97065b2fafbf840bd 100644 (file)
@@ -243,6 +243,7 @@ public class SimpleClient implements CommandProvider {
         }
     }
 
+    @SuppressWarnings("deprecation") //IGetUpdates intentionally deprecated
     public void _unlisten(CommandInterpreter ci) {
         if (this.icluster == null) {
             ci.println("\nNo Clustering services available");
@@ -370,7 +371,7 @@ public class SimpleClient implements CommandProvider {
     }
 
     public void _dumper(CommandInterpreter ci) {
-        ConcurrentMap c;
+        ConcurrentMap<Object, Object> c;
         String containerName = ci.nextArgument();
         if (containerName == null) {
             ci.println("containerName not supplied");
@@ -381,10 +382,10 @@ public class SimpleClient implements CommandProvider {
             ci.println("Cache not supplied");
             return;
         }
-        c = (ConcurrentMap) this.icluster.getCache(containerName, cacheName);
+        c = (ConcurrentMap<Object, Object>) this.icluster.getCache(containerName, cacheName);
         if (c != null) {
-            for (Object e : c.entrySet()) {
-                Map.Entry entry = (Map.Entry) e;
+            for (Map.Entry<Object, Object> e : c.entrySet()) {
+                Map.Entry<Object, Object> entry = e;
                 Object v = entry.getValue();
                 String res = "<NOT KNOWN>";
                 if (v != null) {
@@ -437,6 +438,7 @@ public class SimpleClient implements CommandProvider {
         }
     }
 
+    @SuppressWarnings("deprecation") //TODO: remove call to deprecated amIStandby
     public void _getRole(CommandInterpreter ci) {
         if (this.icluster == null) {
             ci.println("\nNo Clustering services available");
@@ -449,6 +451,7 @@ public class SimpleClient implements CommandProvider {
         ci.println("My role is: " + role);
     }
 
+    @SuppressWarnings("deprecation") //TODO: remove call to deprecated getActiveAddres
     public void _getActive(CommandInterpreter ci) {
         if (this.icluster == null) {
             ci.println("\nNo Clustering services available");
@@ -458,6 +461,7 @@ public class SimpleClient implements CommandProvider {
                 + this.icluster.getActiveAddress());
     }
 
+    @SuppressWarnings("deprecation") //TODO: remove use of deprecated listenRoleChange
     public void _listenActive(CommandInterpreter ci) {
         if (this.icluster == null) {
             ci.println("\nNo Clustering services available");
@@ -473,6 +477,7 @@ public class SimpleClient implements CommandProvider {
         ci.println("Register listenRoleChanges");
     }
 
+    @SuppressWarnings("deprecation") //TODO: remove deprecated call to unlistenRoleChange
     public void _unlistenActive(CommandInterpreter ci) {
         if (this.icluster == null) {
             ci.println("\nNo Clustering services available");
index 96b6c05934d7724a74d406d513dcb3d4bc34dca3..42802d324c295f260ef39103ae310f3594dc3eae 100644 (file)
@@ -956,6 +956,7 @@ public class HostTracker implements IfIptoHost, IfHostListener,
     }
 
     private class ARPRefreshHandler extends TimerTask {
+        @SuppressWarnings("deprecation")
         public void run() {
             if ((clusterContainerService != null)
                     && !clusterContainerService.amICoordinator()) {
index d18070d222b58e035208d52580fc56aea1ac74a6..c83dc3d4089870cc020d0b6abf6fbd15e3637042 100644 (file)
@@ -43,6 +43,7 @@ public class HostNodeConnector extends Host {
     /**
      * Private constructor used for JAXB mapping
      */
+    @SuppressWarnings("unused")
     private HostNodeConnector() {
     }
 
index 29e9dfabb1a7ccb34b146e5aa84a864900b62e64..f37d0133e18ba7d23ce34447b9f102e7c36bee7c 100644 (file)
@@ -46,6 +46,7 @@ public class ContainerServiceDependency implements ServiceDependency,
         this.containerName = containerName;
     }
 
+    @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
     @Override
     public ServiceDependency setService(Class serviceName) {
         this.m_dep.setService(serviceName, "(containerName="
@@ -53,6 +54,7 @@ public class ContainerServiceDependency implements ServiceDependency,
         return this;
     }
 
+    @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
     @Override
     public ServiceDependency setService(Class serviceName, String serviceFilter) {
         this.m_dep.setService(serviceName, "(&(containerName="
@@ -67,6 +69,7 @@ public class ContainerServiceDependency implements ServiceDependency,
         return this;
     }
 
+    @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
     @Override
     public ServiceDependency setService(Class serviceName,
             ServiceReference serviceReference) {
@@ -163,6 +166,7 @@ public class ContainerServiceDependency implements ServiceDependency,
                 .createCopy(), this.containerName);
     }
 
+    @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
     @Override
     public Dictionary getProperties() {
         return this.m_dep.getProperties();
@@ -193,6 +197,7 @@ public class ContainerServiceDependency implements ServiceDependency,
         return this.m_dep.isAutoConfig();
     }
 
+    @SuppressWarnings("rawtypes") // can't change org.apache.felix.dm.ServiceDependency
     @Override
     public Class getAutoConfigType() {
         return this.m_dep.getAutoConfigType();
index 206b3928ea4dfcc61d90f7062f6ed75795b77a31..5c21294f46da0438da325b263039a895e3f08371 100644 (file)
@@ -53,8 +53,8 @@ public class Node implements Serializable {
      * surround.
      */
     public static final class NodeIDType {
-        private static final ConcurrentHashMap<String, Class> compatibleType =
-            new ConcurrentHashMap<String, Class>();
+        private static final ConcurrentHashMap<String, Class<? extends Object>> compatibleType =
+            new ConcurrentHashMap<String, Class<? extends Object>>();
         /**
          * Identifier for an OpenFlow node
          */
@@ -113,7 +113,7 @@ public class Node implements Serializable {
          * @return true if registered, false otherwise
          */
         public static boolean registerIDType(String type,
-                                             Class compatibleID) {
+                                             Class<? extends Object> compatibleID) {
             if (compatibleType.get(type) != null) {
                 return false;
             }  else {
index 86baaade022787bd975bb22fba958a0cdcf6f08a..59a184e5737db9f0aab5512e40f2e44395a3be39 100644 (file)
@@ -50,8 +50,8 @@ public class NodeConnector implements Serializable {
      */
     public static class NodeConnectorIDType {
         private static final
-        ConcurrentHashMap<String, ImmutablePair<Class, String>> compatibleType =
-            new ConcurrentHashMap<String, ImmutablePair<Class, String>>();
+        ConcurrentHashMap<String, ImmutablePair<Class<? extends Object>, String>> compatibleType =
+            new ConcurrentHashMap<String, ImmutablePair<Class<? extends Object>, String>>();
         /**
          * Represent a special port pointing toward the controller,
          * this is to send data packets toward the controller from
@@ -175,7 +175,7 @@ public class NodeConnector implements Serializable {
          * @return true if registered, false otherwise
          */
         public static boolean registerIDType(String type,
-                                             Class compatibleID,
+                                             Class<? extends Object> compatibleID,
                                              String compatibleNode) {
             if (compatibleType.get(type) != null) {
                 return false;
index 51cdcfb434807a601baef6c30ff21f9790f7a540..285e33f53b91690ef7711bd1352b8956da90a63c 100644 (file)
@@ -259,7 +259,7 @@ public class Topology {
             }
         }
         
-        CircleLayout layout = new CircleLayout(graph);
+        CircleLayout<String,String> layout = new CircleLayout<String,String>(graph);
         layout.setSize(new Dimension(1200, 365));
         for (Map.Entry<String, Map<String, Object>> v : newNodes.entrySet()) {
             Double x = layout.transform(v.getKey()).getX();