Merge changes I52c2aaab,I2509ed5e,Ic1d8a4e5,I73730f79,Ica1959e5,I0ce61b07
authorTony Tkacik <ttkacik@cisco.com>
Sat, 8 Nov 2014 16:06:15 +0000 (16:06 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 8 Nov 2014 16:06:15 +0000 (16:06 +0000)
* changes:
  Fix a raw Dictionary reference
  Fix a raw Enumeration reference
  Fix a non-generic CheckedFuture
  Access static methods via class
  Remove unused local variable
  Fix non-generic references to Optional

opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/AbstractConfigTest.java
opendaylight/md-sal/inventory-manager/src/main/java/org/opendaylight/controller/md/inventory/manager/NodeChangeCommiter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedDataBroker.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/MeteredBoundedMailbox.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLAdapter.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/NetconfMonitoringServiceImplTest.java
opendaylight/northbound/bundlescanner/implementation/src/test/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScannerTest.java

index 63a37de..c4a4192 100644 (file)
@@ -213,7 +213,7 @@ public abstract class AbstractConfigTest extends
 
             Object serviceTypeRaw = args[0];
             Object serviceInstance = args[1];
-            Dictionary<String, ?> props = (Dictionary) args[2];
+            Dictionary<String, ?> props = (Dictionary<String, ?>) args[2];
 
             if (serviceTypeRaw instanceof Class) {
                 Class<?> serviceType = (Class<?>) serviceTypeRaw;
index b14bfd4..ec184ad 100644 (file)
@@ -32,7 +32,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.No
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnectorKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
-import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
 import org.slf4j.Logger;
@@ -112,10 +111,10 @@ class NodeChangeCommiter implements OpendaylightInventoryListener {
                 InstanceIdentifierBuilder<Node> builder = ((InstanceIdentifier<Node>) ref.getValue()).builder();
                 InstanceIdentifierBuilder<FlowCapableNode> augmentation = builder.augmentation(FlowCapableNode.class);
                 final InstanceIdentifier<FlowCapableNode> path = augmentation.build();
-                CheckedFuture readFuture = tx.read(LogicalDatastoreType.OPERATIONAL, path);
-                Futures.addCallback(readFuture, new FutureCallback<Optional<? extends DataObject>>() {
+                CheckedFuture<Optional<FlowCapableNode>, ?> readFuture = tx.read(LogicalDatastoreType.OPERATIONAL, path);
+                Futures.addCallback(readFuture, new FutureCallback<Optional<FlowCapableNode>>() {
                     @Override
-                    public void onSuccess(Optional<? extends DataObject> optional) {
+                    public void onSuccess(Optional<FlowCapableNode> optional) {
                         enqueueWriteNodeDataTx(node, flowNode, path);
                         if (!optional.isPresent()) {
                             enqueuePutTable0Tx(ref);
index d4b1d84..273155b 100644 (file)
@@ -124,7 +124,7 @@ public abstract class AbstractForwardedDataBroker implements Delegator<DOMDataBr
         if (path.isWildcarded()) {
             return Optional.absent();
         }
-        return (Optional) getCodec().deserializeFunction(path).apply(Optional.<NormalizedNode<?, ?>> of(data));
+        return (Optional<DataObject>) getCodec().deserializeFunction(path).apply(Optional.<NormalizedNode<?, ?>> of(data));
     }
 
     private class TranslatingDataChangeInvoker implements DOMDataChangeListener {
index 458f379..7517efe 100644 (file)
@@ -55,7 +55,7 @@ public class MeteredBoundedMailbox implements MailboxType, ProducesMessageQueue<
             return; //there's no actor to monitor
         }
         String actorName = owner.get().path().toStringWithoutAddress();
-        String metricName = registry.name(actorName, QUEUE_SIZE);
+        String metricName = MetricRegistry.name(actorName, QUEUE_SIZE);
 
         if (registry.getMetrics().containsKey(metricName))
             return; //already registered
index ecea744..ad4bd46 100644 (file)
@@ -349,7 +349,7 @@ public class XSQLAdapter extends Thread implements SchemaContextListener {
         JDBCResultSet rs = new JDBCResultSet(sql);
         try {
             int count = 0;
-            jdbcServer.execute(rs, this);
+            JDBCServer.execute(rs, this);
             boolean isFirst = true;
             int loc = rs.getFields().size() - 1;
             int totalWidth = 0;
index 1b078be..a188550 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import io.netty.channel.Channel;
-import java.util.List;
 import java.util.Set;
 import org.junit.Before;
 import org.junit.Test;
@@ -56,7 +55,6 @@ public class NetconfMonitoringServiceImplTest {
     public void testSessions() throws Exception {
         doReturn("sessToStr").when(managementSession).toString();
         service.onSessionUp(managementSession);
-        List list = Lists.newArrayList(managementSession);
     }
 
     @Test(expected = RuntimeException.class)
@@ -80,12 +78,12 @@ public class NetconfMonitoringServiceImplTest {
         doReturn(snapshot).when(operationProvider).openSnapshot(anyString());
         doReturn(services).when(snapshot).getServices();
         doReturn(caps).when(operationService).getCapabilities();
-        Optional opt = mock(Optional.class);
+        Optional<String> opt = mock(Optional.class);
         doReturn(opt).when(cap).getCapabilitySchema();
         doReturn(true).when(opt).isPresent();
         doReturn(opt).when(cap).getModuleNamespace();
         doReturn("namespace").when(opt).get();
-        Optional optRev = Optional.of("rev");
+        Optional<String> optRev = Optional.of("rev");
         doReturn(optRev).when(cap).getRevision();
         doReturn(Optional.of("modName")).when(cap).getModuleName();
         doReturn(Optional.of(Lists.newArrayList("loc"))).when(cap).getLocation();
index 13431fb..c2efbe6 100644 (file)
@@ -216,7 +216,7 @@ public class BundleScannerTest {
         }
 
         @Override
-        public Enumeration findEntries(String path, String filePattern, boolean recurse) {
+        public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
             return Collections.enumeration(classes);
         }
 

©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.