Merge changes I0fe4b78d,I3d3bc71b
authorTony Tkacik <ttkacik@cisco.com>
Mon, 10 Nov 2014 08:55:14 +0000 (08:55 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Nov 2014 08:55:14 +0000 (08:55 +0000)
* changes:
  Fix non-generic reference to org.opendaylight.yangtools.yang.data.api.Node
  Fix non-generic references to java.util.Map

opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/CommonConfig.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleCompositeAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleIdentityRefAttributeWritingStrategy.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/attributes/toxml/SimpleUnionAttributeWritingStrategy.java
opendaylight/sal/connection/implementation/src/main/java/org/opendaylight/controller/sal/connection/implementation/internal/ConnectionService.java
opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/DataPacketService.java

index 0d139f9..48afe40 100644 (file)
@@ -109,7 +109,7 @@ public class CommonConfig extends AbstractConfig {
         public T mailboxCapacity(int capacity) {
             Preconditions.checkArgument(capacity > 0, "mailbox capacity must be >0");
 
-            Map<String, Object> boundedMailbox = (Map) configHolder.get(TAG_MAILBOX);
+            Map<String, Object> boundedMailbox = (Map<String, Object>) configHolder.get(TAG_MAILBOX);
             boundedMailbox.put(TAG_MAILBOX_CAPACITY, capacity);
             return (T)this;
         }
@@ -118,7 +118,7 @@ public class CommonConfig extends AbstractConfig {
             Duration pushTimeout = Duration.create(timeout);
             Preconditions.checkArgument(pushTimeout.isFinite(), "invalid value for mailbox push timeout");
 
-            Map<String, Object> boundedMailbox = (Map) configHolder.get(TAG_MAILBOX);
+            Map<String, Object> boundedMailbox = (Map<String, Object>) configHolder.get(TAG_MAILBOX);
             boundedMailbox.put(TAG_MAILBOX_PUSH_TIMEOUT, timeout);
             return (T)this;
         }
index b59a32e..797258b 100644 (file)
@@ -140,7 +140,7 @@ public class NormalizedNodeInputStreamReader implements NormalizedNodeStreamRead
 
             case NodeTypes.ANY_XML_NODE :
                 LOG.debug("Read xml node");
-                Node value = (Node) readObject();
+                Node<?> value = (Node<?>) readObject();
                 return Builders.anyXmlBuilder().withValue(value).build();
 
             case NodeTypes.MAP_NODE :
index 10b643f..47fbc6d 100644 (file)
@@ -26,8 +26,8 @@ public class SimpleCompositeAttributeWritingStrategy extends SimpleAttributeWrit
 
     protected Object preprocess(Object value) {
         Util.checkType(value, Map.class);
-        Preconditions.checkArgument(((Map)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
-        return ((Map)value).values().iterator().next();
+        Preconditions.checkArgument(((Map<?, ?>)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
+        return ((Map<?, ?>)value).values().iterator().next();
     }
 
 }
index 104bf4d..1e5d2bb 100644 (file)
@@ -33,8 +33,8 @@ public class SimpleIdentityRefAttributeWritingStrategy extends SimpleAttributeWr
 
     protected Object preprocess(Object value) {
         Util.checkType(value, Map.class);
-        Preconditions.checkArgument(((Map)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
-        Object stringValue = ((Map) value).values().iterator().next();
+        Preconditions.checkArgument(((Map<?, ?>)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
+        Object stringValue = ((Map<?, ?>) value).values().iterator().next();
         Util.checkType(stringValue, String.class);
 
         return stringValue;
index 36010ae..4802cba 100644 (file)
@@ -27,8 +27,8 @@ public class SimpleUnionAttributeWritingStrategy extends SimpleAttributeWritingS
 
     protected Object preprocess(Object value) {
         Util.checkType(value, Map.class);
-        Preconditions.checkArgument(((Map)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
-        Object listOfStrings = ((Map) value).values().iterator().next();
+        Preconditions.checkArgument(((Map<?, ?>)value).size() == 1, "Unexpected number of values in %s, expected 1", value);
+        Object listOfStrings = ((Map<?, ?>) value).values().iterator().next();
         Util.checkType(listOfStrings, List.class);
 
         StringBuilder b = new StringBuilder();
index 7bd15ff..5a637b7 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.controller.sal.connection.implementation.internal;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-
 import org.opendaylight.controller.sal.connection.ConnectionConstants;
 import org.opendaylight.controller.sal.connection.ConnectionLocality;
 import org.opendaylight.controller.sal.connection.IConnectionListener;
@@ -32,7 +31,7 @@ public class ConnectionService implements IPluginOutConnectionService, IConnecti
     private ConcurrentMap<String, IPluginInConnectionService> pluginService =
             new ConcurrentHashMap<String, IPluginInConnectionService>();
 
-    void setPluginService (Map props, IPluginInConnectionService s) {
+    void setPluginService (Map<?, ?> props, IPluginInConnectionService s) {
         String type = null;
         Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
         if (value instanceof String) {
@@ -46,7 +45,7 @@ public class ConnectionService implements IPluginOutConnectionService, IConnecti
         }
     }
 
-    void unsetPluginService(Map props, IPluginInConnectionService s) {
+    void unsetPluginService(Map<?, ?> props, IPluginInConnectionService s) {
         String type = null;
 
         Object value = props.get(GlobalConstants.PROTOCOLPLUGINTYPE.toString());
index 0c9ebab..6f23cc7 100644 (file)
@@ -204,23 +204,22 @@ public class DataPacketService implements IPluginOutDataPacketService,
         }
     }
 
-    void setPluginInDataService(Map props, IPluginInDataPacketService s) {
+    void setPluginInDataService(Map<?, ?> props, IPluginInDataPacketService s) {
         ProtocolService.set(this.pluginInDataService, props, s, logger);
     }
 
-    void unsetPluginInDataService(Map props, IPluginInDataPacketService s) {
+    void unsetPluginInDataService(Map<?, ?> props, IPluginInDataPacketService s) {
         ProtocolService.unset(this.pluginInDataService, props, s, logger);
     }
 
-    void setListenDataPacket(Map props, IListenDataPacket s) {
+    void setListenDataPacket(Map<?, ?> props, IListenDataPacket s) {
         if (this.listenDataPacket == null || this.indexDataPacket == null) {
             logger.error("data structure to store data is NULL");
             return;
         }
         logger.trace("Received setListenDataPacket request");
-        for (Object e : props.entrySet()) {
-            Map.Entry entry = (Map.Entry) e;
-            logger.trace("Prop key:({}) value:({})",entry.getKey(), entry.getValue());
+        for (Map.Entry<?, ?> e : props.entrySet()) {
+            logger.trace("Prop key:({}) value:({})",e.getKey(), e.getValue());
         }
 
         String listenerName = null;
@@ -295,15 +294,14 @@ public class DataPacketService implements IPluginOutDataPacketService,
         }
     }
 
-    void unsetListenDataPacket(Map props, IListenDataPacket s) {
+    void unsetListenDataPacket(Map<?, ?> props, IListenDataPacket s) {
         if (this.listenDataPacket == null || this.indexDataPacket == null) {
             logger.error("data structure to store data is NULL");
             return;
         }
         logger.trace("Received UNsetListenDataPacket request");
-        for (Object e : props.entrySet()) {
-            Map.Entry entry = (Map.Entry) e;
-            logger.trace("Prop key:({}) value:({})",entry.getKey(), entry.getValue());
+        for (Map.Entry<?, ?> e : props.entrySet()) {
+            logger.trace("Prop key:({}) value:({})",e.getKey(), e.getValue());
         }
 
         String listenerName = null;

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.