Merge changes I525c2070,Ib920ff67
authorTony Tkacik <ttkacik@cisco.com>
Mon, 10 Nov 2014 10:44:10 +0000 (10:44 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Nov 2014 10:44:10 +0000 (10:44 +0000)
* changes:
  Fix neutron pagination
  Reuse NeutronObject comparator

86 files changed:
features/base/pom.xml
opendaylight/commons/filter-valve/src/test/java/org/opendaylight/controller/filtervalve/cors/model/UrlMatcherTest.java
opendaylight/commons/httpclient/pom.xml
opendaylight/commons/integrationtest/pom.xml
opendaylight/commons/opendaylight/pom.xml
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/AbstractConfigTest.java
opendaylight/config/config-persister-api/src/test/java/org/opendaylight/controller/config/persist/test/PropertiesProviderTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/SchemaContextTest.java
opendaylight/distribution/opendaylight-karaf-empty/pom.xml
opendaylight/distribution/opendaylight-karaf/pom.xml
opendaylight/distribution/opendaylight/pom.xml
opendaylight/md-sal/inventory-manager/src/main/java/org/opendaylight/controller/md/inventory/manager/NodeChangeCommiter.java
opendaylight/md-sal/sal-akka-raft/pom.xml
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/Leader.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AppendEntries.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/InstallSnapshot.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/CandidateTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/LeaderTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/utils/MessageCollectorActor.java
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedDataBroker.java
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-clustering-commons/pom.xml
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/common/actor/MeteredBoundedMailbox.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/NormalizedNodeGetter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/NormalizedNodeNavigator.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/NormalizedNodePrinter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/NormalizedNodeVisitor.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/NormalizedNodeSerializer.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/NormalizedNodeType.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/ValueSerializer.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/ValueType.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeInputStreamReader.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NormalizedNodeOutputStreamWriter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/ValueTypes.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/NormalizedNodeToNodeCodecTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/PathUtilsTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/NormalizedNodeSerializerTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/node/utils/serialization/ValueSerializerTest.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/datastore/util/InstanceIdentifierUtilsTest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTestKit.java
opendaylight/md-sal/sal-dom-broker/pom.xml
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/sal/dom/broker/BackwardsCompatibleMountPointTest.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLAdapter.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLBluePrint.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLBluePrintNode.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLBluePrintRelation.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLColumn.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/XSQLODLUtils.java
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/controller/md/sal/dom/xsql/jdbc/JDBCResultSet.java
opendaylight/md-sal/sal-remoterpc-connector/pom.xml
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/utils/ConditionalProbe.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistryTest.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java
opendaylight/md-sal/sal-rest-docgen/pom.xml
opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/DocProvider.java
opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/impl/NotificationServiceImpl.java
opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/listeners/RemoteNotificationListener.java
opendaylight/md-sal/sal-restconf-broker/src/main/java/org/opendaylight/controller/sal/restconf/broker/listeners/SalNotificationListener.java
opendaylight/md-sal/statistics-manager/pom.xml
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/netconf/config-netconf-connector/src/test/java/org/opendaylight/controller/netconf/confignetconfconnector/operations/runtimerpc/RuntimeRpcElementResolvedTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorFactoryTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiatorTest.java
opendaylight/netconf/netconf-client/src/test/java/org/opendaylight/controller/netconf/client/SimpleNetconfClientSessionListenerTest.java
opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/NetconfMonitoringServiceImplTest.java
opendaylight/netconf/netconf-netty-util/pom.xml
opendaylight/netconf/pom.xml
opendaylight/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScanner.java
opendaylight/northbound/bundlescanner/implementation/src/test/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScannerTest.java
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFirewallPolicyNorthbound.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
opendaylight/sal/implementation/src/main/java/org/opendaylight/controller/sal/implementation/internal/ProtocolService.java
opendaylight/topologymanager/implementation/pom.xml
opendaylight/topologymanager/shell/pom.xml

index cd84eeaf3395df9718dad12e9e9c006d82d39d04..3dbb9391b0606c6c1cfd9238d77bfaaddff136bf 100644 (file)
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-test</artifactId>
-      <version>0.7.0-SNAPSHOT</version>
     </dependency>
     <!-- dependency for opendaylight-karaf-empty for use by testing -->
     <dependency>
index 07f6354b19d568a6a0440183f6bc4367b1a91484..6276deab78c8183a563e591af1e85b541d2974dd 100644 (file)
@@ -24,14 +24,11 @@ public class UrlMatcherTest {
         final String jspFilter = "jspFilter";
         final String exactMatch = "/somePath";
         final String prefixFilter = "prefixFilter";
-        LinkedHashMap<String, String> patternMap = new LinkedHashMap<String, String>() {
-            {
-                put(exactMatch, exactMatchFilter);
-                put("/*", defaultFilter);
-                put("*.jsp", jspFilter);
-                put("/foo/*", prefixFilter);
-            }
-        };
+        LinkedHashMap<String, String> patternMap = new LinkedHashMap<>();
+        patternMap.put(exactMatch, exactMatchFilter);
+        patternMap.put("/*", defaultFilter);
+        patternMap.put("*.jsp", jspFilter);
+        patternMap.put("/foo/*", prefixFilter);
         urlMatcher = new UrlMatcher<>(patternMap);
         assertMatches("/abc", defaultFilter);
         assertMatches(exactMatch, exactMatchFilter, defaultFilter);
index 39364cbcbaee86d2fdf238b1825c5092d79beafa..3848044b430441b90b2659af24416f649fb047b5 100644 (file)
@@ -62,7 +62,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
index ad4e166cbd492fbd2279a8fe3e4fa10545ac7e2e..4769a03b2fee6de9c1b241a57638fe254e1ac5f0 100644 (file)
@@ -80,7 +80,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
@@ -96,7 +95,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
         <configuration>
           <skipTests>true</skipTests>
         </configuration>
index ae37f4ae2aaed13ebbef886d17bca420dc9d92eb..f61094ab48c501beb2a8d77b55faf06217d44a0f 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <failsOnError>true</failsOnError>
           <configLocation>controller/checkstyle.xml</configLocation>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
         <configuration>
           <argLine>${testvm.argLine} ${jacoco.agent.ut.arg}</argLine>
           <systemProperties>
index 63a37de0c3783179ffaaf33ab535281dcab62290..c4a4192cba796340cc845d496060dba7d0f268d5 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 3d4757b926f0fad6900d0c673ebd562c2afc9085..2c60310e8a0d5d5063cfcc56999f174d1d8aebba 100644 (file)
@@ -12,7 +12,7 @@ import java.util.Map;
 import org.opendaylight.controller.config.persist.api.PropertiesProvider;
 
 public class PropertiesProviderTest implements PropertiesProvider {
-    private final Map<String,String> properties = new HashMap();
+    private final Map<String,String> properties = new HashMap<>();
 
     public void addProperty(String key,String value){
         properties.put(key,value);
index 1837bac2664bdfa9a96feb7f25435ac418d37dda..b72d85c11828ea26b26b781ddcc53a747e711d55 100644 (file)
@@ -95,7 +95,7 @@ public class SchemaContextTest extends AbstractYangTest {
             }
         }
         assertEquals("Expected identities not found " + copyOfExpectedNames,
-                Collections.EMPTY_MAP, copyOfExpectedNames);
+                Collections.emptyMap(), copyOfExpectedNames);
     }
 
     @Test
index 72eaf005add191a82a08c9f4f81db0b4fc11c0ba..a66a502a70e540b237799cc348da0b8fe0ef67ed 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
index 3a2f4b058020f86c3f20faaa5f5e61c4a558dfbb..e44b569759d3b611d35fa730778ca7a16d565a00 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
index f6ecb44fa172f02fd4cd5f34824325ad30629ef8..cd02759f5a13e4573f41c06ca0f0c34c8e762919 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>${checkstyle.version}</version>
         <configuration>
           <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/configuration\/initial\/</excludes>
         </configuration>
         <dependency>
           <groupId>commons-lang</groupId>
           <artifactId>commons-lang</artifactId>
-          <version>2.4</version>
         </dependency>
         <dependency>
           <groupId>org.apache.servicemix.bundles</groupId>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-inmemory-datastore</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
         <dependency>
           <groupId>org.opendaylight.controller.model</groupId>
           <artifactId>model-topology</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
         </dependency>
 
         <!-- toaster example I'm pretty sure we should trim -->
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster-consumer</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.controller.samples</groupId>
           <artifactId>sample-toaster-provider</artifactId>
-          <version>${mdsal.version}</version>
         </dependency>
         <dependency>
           <groupId>org.apache.sshd</groupId>
         <dependency>
           <groupId>org.opendaylight.yangtools.thirdparty</groupId>
           <artifactId>antlr4-runtime-osgi-nohead</artifactId>
-          <version>4.0</version>
         </dependency>
         <dependency>
           <groupId>org.opendaylight.yangtools.thirdparty</groupId>
           <artifactId>xtend-lib-osgi</artifactId>
-          <version>2.4.3</version>
         </dependency>
         <dependency>
           <groupId>org.openexi</groupId>
index b14bfd429c4d8ee8121cabc00f70e69ff34e3113..ec184ad1013a34bbc4b8660880a37abdbfa9c5f8 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 53353cded17e3abc57f21c3a3737b09cebb9dede..4b6091b4294f7ecd2a5ef103d1729440138f5193 100644 (file)
@@ -13,7 +13,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-clustering-commons</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
@@ -81,7 +80,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
 
index 2437bb4b7d381ff34a58138a14a7723ee7289a64..cb375c24909a1df214a52a7b18d4844e0ac7f5cb 100644 (file)
@@ -118,12 +118,12 @@ public class ExampleActor extends RaftActor {
     @Override protected void applySnapshot(final ByteString snapshot) {
         state.clear();
         try {
-            state.putAll((HashMap) toObject(snapshot));
+            state.putAll((Map<String, String>) toObject(snapshot));
         } catch (Exception e) {
            LOG.error(e, "Exception in applying snapshot");
         }
         if(LOG.isDebugEnabled()) {
-            LOG.debug("Snapshot applied to state : {}", ((HashMap) state).size());
+            LOG.debug("Snapshot applied to state : {}", ((Map<?, ?>) state).size());
         }
     }
 
index ef104e7f58527a4be47bda4351e69f00e320786c..d83362b58081c0e4c4576a848bf10ca29d8fc7da 100644 (file)
@@ -70,7 +70,7 @@ import java.util.concurrent.atomic.AtomicLong;
 public class Leader extends AbstractRaftActorBehavior {
 
 
-    protected final Map<String, FollowerLogInformation> followerToLog = new HashMap();
+    protected final Map<String, FollowerLogInformation> followerToLog = new HashMap<>();
     protected final Map<String, FollowerToSnapshot> mapFollowerToSnapshot = new HashMap<>();
 
     private final Set<String> followers;
index 5149cf9f34f5f66873feb4695b8939c36aa81d6b..14eb8a4b77ce98bff75d01afe2103f417897d4cb 100644 (file)
@@ -25,7 +25,7 @@ import java.util.Map;
  */
 public class AppendEntries extends AbstractRaftRPC {
 
-    public static final Class SERIALIZABLE_CLASS = AppendEntriesMessages.AppendEntries.class;
+    public static final Class<AppendEntriesMessages.AppendEntries> SERIALIZABLE_CLASS = AppendEntriesMessages.AppendEntries.class;
 
     private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(AppendEntries.class);
 
index c084cba82210823ada7f79a0edb35472ec6ed326..5a0cc95c21964168f305445d129b9dfe3f7d6bbb 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.controller.protobuff.messages.cluster.raft.InstallSnapsh
 
 public class InstallSnapshot extends AbstractRaftRPC {
 
-    public static final Class SERIALIZABLE_CLASS = InstallSnapshotMessages.InstallSnapshot.class;
+    public static final Class<InstallSnapshotMessages.InstallSnapshot> SERIALIZABLE_CLASS = InstallSnapshotMessages.InstallSnapshot.class;
 
     private final String leaderId;
     private final long lastIncludedIndex;
index 0d5f644b3db2e559dbd22a318c9f7dd067e7cb2f..a1088aa7f2b0bfe7be22cfc4b8ece4616fd58db3 100644 (file)
@@ -33,7 +33,7 @@ public class MockRaftActorContext implements RaftActorContext {
     private long lastApplied = 0;
     private final ElectionTerm electionTerm;
     private ReplicatedLog replicatedLog;
-    private Map<String, String> peerAddresses = new HashMap();
+    private Map<String, String> peerAddresses = new HashMap<>();
     private ConfigParams configParams;
 
     public MockRaftActorContext(){
index 87e40f236cf5c6dfee6e03ea711d61d342d9b345..b0a144c7b3b60d32a1ae5d180306f5a06cf614d7 100644 (file)
@@ -176,7 +176,7 @@ public class RaftActorTest extends AbstractActorTest {
                 Object data = toObject(snapshot);
                 System.out.println("!!!!!applyRecoverySnapshot: "+data);
                 if (data instanceof List) {
-                    state.addAll((List) data);
+                    state.addAll((List<?>) data);
                 }
             } catch (Exception e) {
                 e.printStackTrace();
@@ -237,7 +237,7 @@ public class RaftActorTest extends AbstractActorTest {
             super(actorSystem);
 
             raftActor = this.getSystem().actorOf(MockRaftActor.props(actorName,
-                    Collections.EMPTY_MAP, Optional.<ConfigParams>absent()), actorName);
+                    Collections.<String,String>emptyMap(), Optional.<ConfigParams>absent()), actorName);
 
         }
 
@@ -246,7 +246,7 @@ public class RaftActorTest extends AbstractActorTest {
             return raftActor;
         }
 
-        public boolean waitForLogMessage(final Class logEventClass, String message){
+        public boolean waitForLogMessage(final Class<?> logEventClass, String message){
             // Wait for a specific log message to show up
             return
                 new JavaTestKit.EventFilter<Boolean>(logEventClass
@@ -314,7 +314,7 @@ public class RaftActorTest extends AbstractActorTest {
             config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
             ActorRef followerActor = getSystem().actorOf(MockRaftActor.props(persistenceId,
-                    Collections.EMPTY_MAP, Optional.<ConfigParams>of(config)), persistenceId);
+                    Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config)), persistenceId);
 
             watch(followerActor);
 
@@ -368,7 +368,7 @@ public class RaftActorTest extends AbstractActorTest {
 
             //reinstate the actor
             TestActorRef<MockRaftActor> ref = TestActorRef.create(getSystem(),
-                    MockRaftActor.props(persistenceId, Collections.EMPTY_MAP,
+                    MockRaftActor.props(persistenceId, Collections.<String,String>emptyMap(),
                             Optional.<ConfigParams>of(config)));
 
             ref.underlyingActor().waitForRecoveryComplete();
@@ -401,7 +401,7 @@ public class RaftActorTest extends AbstractActorTest {
                 config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config)), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config)), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -470,7 +470,7 @@ public class RaftActorTest extends AbstractActorTest {
                 config.setHeartBeatInterval(new FiniteDuration(1, TimeUnit.DAYS));
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), new DataPersistenceProviderMonitor()), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), new DataPersistenceProviderMonitor()), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -535,7 +535,7 @@ public class RaftActorTest extends AbstractActorTest {
                 dataPersistenceProviderMonitor.setPersistLatch(persistLatch);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -562,7 +562,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -591,7 +591,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -620,7 +620,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -647,7 +647,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(),
-                    MockRaftActor.props(persistenceId,Collections.EMPTY_MAP,
+                    MockRaftActor.props(persistenceId,Collections.<String,String>emptyMap(),
                         Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
@@ -687,7 +687,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -746,7 +746,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProvider dataPersistenceProvider = mock(DataPersistenceProvider.class);
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProvider), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -776,7 +776,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProviderMonitor dataPersistenceProviderMonitor = new DataPersistenceProviderMonitor();
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
@@ -831,7 +831,7 @@ public class RaftActorTest extends AbstractActorTest {
                 DataPersistenceProviderMonitor dataPersistenceProviderMonitor = new DataPersistenceProviderMonitor();
 
                 TestActorRef<MockRaftActor> mockActorRef = TestActorRef.create(getSystem(), MockRaftActor.props(persistenceId,
-                        Collections.EMPTY_MAP, Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
+                        Collections.<String,String>emptyMap(), Optional.<ConfigParams>of(config), dataPersistenceProviderMonitor), persistenceId);
 
                 MockRaftActor mockRaftActor = mockActorRef.underlyingActor();
 
index fb02481115d81320f042198d5b3ed3962713306f..485ee4b316d2506b35d31cfed5f6aa252f16bff3 100644 (file)
@@ -9,17 +9,16 @@ import org.junit.Test;
 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
 import org.opendaylight.controller.cluster.raft.MockRaftActorContext;
 import org.opendaylight.controller.cluster.raft.RaftActorContext;
+import org.opendaylight.controller.cluster.raft.ReplicatedLogEntry;
 import org.opendaylight.controller.cluster.raft.base.messages.ElectionTimeout;
 import org.opendaylight.controller.cluster.raft.messages.AppendEntries;
 import org.opendaylight.controller.cluster.raft.messages.AppendEntriesReply;
 import org.opendaylight.controller.cluster.raft.messages.RequestVote;
 import org.opendaylight.controller.cluster.raft.messages.RequestVoteReply;
 import org.opendaylight.controller.cluster.raft.utils.DoNothingActor;
-
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-
 import static org.junit.Assert.assertEquals;
 
 public class CandidateTest extends AbstractRaftActorBehaviorTest {
@@ -168,7 +167,7 @@ public class CandidateTest extends AbstractRaftActorBehaviorTest {
 
                     Candidate candidate = new Candidate(createActorContext(getTestActor()));
 
-                    candidate.handleMessage(getTestActor(), new AppendEntries(0, "test", 0,0,Collections.EMPTY_LIST, 0));
+                    candidate.handleMessage(getTestActor(), new AppendEntries(0, "test", 0,0,Collections.<ReplicatedLogEntry>emptyList(), 0));
 
                     final Boolean out = new ExpectMsg<Boolean>(duration("1 seconds"), "AppendEntriesResponse") {
                         // do not put code outside this method, will run afterwards
index 705c69607c658d16d03086b573230923e2ba05b4..168eb3e5f22c9752dcbe089fe2e87393713d2650 100644 (file)
@@ -76,7 +76,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
                     MockRaftActorContext actorContext = (MockRaftActorContext) createActorContext();
 
-                    Map<String, String> peerAddresses = new HashMap();
+                    Map<String, String> peerAddresses = new HashMap<>();
 
                     peerAddresses.put(followerActor.path().toString(),
                         followerActor.path().toString());
@@ -121,7 +121,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
                     MockRaftActorContext actorContext =
                         (MockRaftActorContext) createActorContext();
 
-                    Map<String, String> peerAddresses = new HashMap();
+                    Map<String, String> peerAddresses = new HashMap<>();
 
                     peerAddresses.put(followerActor.path().toString(),
                         followerActor.path().toString());
@@ -216,7 +216,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
         new JavaTestKit(getSystem()) {{
             ActorRef followerActor = getSystem().actorOf(Props.create(MessageCollectorActor.class));
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -300,7 +300,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ActorRef followerActor = getTestActor();
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -371,7 +371,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ActorRef followerActor = getTestActor();
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -434,7 +434,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ActorRef followerActor = getTestActor();
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -514,7 +514,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ActorRef followerActor = getTestActor();
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -690,7 +690,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ForwardMessageToBehaviorActor.setBehavior(follower);
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -760,7 +760,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
 
             ForwardMessageToBehaviorActor.setBehavior(follower);
 
-            Map<String, String> peerAddresses = new HashMap();
+            Map<String, String> peerAddresses = new HashMap<>();
             peerAddresses.put(followerActor.path().toString(),
                 followerActor.path().toString());
 
@@ -823,7 +823,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
                 MockRaftActorContext leaderActorContext =
                     new MockRaftActorContext("leader", getSystem(), leaderActor);
 
-                Map<String, String> peerAddresses = new HashMap();
+                Map<String, String> peerAddresses = new HashMap<>();
                 peerAddresses.put("follower-1",
                     followerActor.path().toString());
 
@@ -858,7 +858,7 @@ public class LeaderTest extends AbstractRaftActorBehaviorTest {
                 leaderActorContext.setReplicatedLog(
                     new MockRaftActorContext.MockReplicatedLogBuilder().createEntries(0, 3, 1).build());
 
-                Map<String, String> peerAddresses = new HashMap();
+                Map<String, String> peerAddresses = new HashMap<>();
                 peerAddresses.put("follower-1",
                     followerActor.path().toString());
 
index 3e2e4a05ea21d5826f81e128a5cf92bcabe69763..2a79c8f4bccae74605923ae5c90af5d59b1f3512 100644 (file)
@@ -54,7 +54,7 @@ public class MessageCollectorActor extends UntypedActor {
      * @param clazz
      * @return
      */
-    public static Object getFirstMatching(ActorRef actor, Class clazz) throws Exception {
+    public static Object getFirstMatching(ActorRef actor, Class<?> clazz) throws Exception {
         List<Object> allMessages = getAllMessages(actor);
 
         for(Object message : allMessages){
@@ -66,7 +66,7 @@ public class MessageCollectorActor extends UntypedActor {
         return null;
     }
 
-    public static List<Object> getAllMatching(ActorRef actor, Class clazz) throws Exception {
+    public static List<Object> getAllMatching(ActorRef actor, Class<?> clazz) throws Exception {
         List<Object> allMessages = getAllMessages(actor);
 
         List<Object> output = Lists.newArrayList();
index 7482c52fdd005e531cf95a284cff87c5614b796b..ade3e1b8f6ba73376f5391a8db1da0f1d8c0dcb1 100644 (file)
@@ -70,7 +70,6 @@
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>binding-data-codec</artifactId>
-      <version>0.7.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
index 754d14f2c4cfc9d23791521e4ee30e6bc468d0ec..0ad043489269df0f6443e37f8aa20d0f60fbccca 100644 (file)
@@ -7,42 +7,25 @@
  */
 package org.opendaylight.controller.config.yang.md.sal.binding.impl;
 
-import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import java.util.Hashtable;
-import java.util.Map.Entry;
-import java.util.Set;
 import javassist.ClassPool;
 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
 import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
 import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
 import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
-import org.opendaylight.yangtools.concepts.Delegator;
 import org.opendaylight.yangtools.sal.binding.generator.impl.GeneratedClassLoadingStrategy;
 import org.opendaylight.yangtools.sal.binding.generator.impl.RuntimeGeneratedMappingServiceImpl;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService;
-import org.opendaylight.yangtools.yang.data.impl.codec.CodecRegistry;
-import org.opendaylight.yangtools.yang.data.impl.codec.DeserializationException;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
 *
 */
 public final class RuntimeMappingModule extends AbstractRuntimeMappingModule {
 
-    private static final Logger LOG = LoggerFactory.getLogger(RuntimeMappingModule.class);
-
     private BundleContext bundleContext;
 
     public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
@@ -72,7 +55,7 @@ public final class RuntimeMappingModule extends AbstractRuntimeMappingModule {
     public java.lang.AutoCloseable createInstance() {
         final GeneratedClassLoadingStrategy classLoading = getGlobalClassLoadingStrategy();
         final BindingIndependentMappingService legacyMapping = getGlobalLegacyMappingService(classLoading);
-        BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(new StreamWriterGenerator(SingletonHolder.JAVASSIST));
+        BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(StreamWriterGenerator.create(SingletonHolder.JAVASSIST));
         BindingToNormalizedNodeCodec instance = new BindingToNormalizedNodeCodec(classLoading, legacyMapping, codecRegistry);
         bundleContext.registerService(SchemaContextListener.class, instance, new Hashtable<String,String>());
         return instance;
@@ -108,93 +91,4 @@ public final class RuntimeMappingModule extends AbstractRuntimeMappingModule {
     public void setBundleContext(final BundleContext bundleContext) {
         this.bundleContext = bundleContext;
     }
-
-    private static final class RuntimeGeneratedMappingServiceProxy implements //
-    BindingIndependentMappingService, //
-    Delegator<BindingIndependentMappingService>, //
-    AutoCloseable {
-
-        private BindingIndependentMappingService delegate;
-        private ServiceReference<BindingIndependentMappingService> reference;
-        private BundleContext bundleContext;
-
-        public RuntimeGeneratedMappingServiceProxy(final BundleContext bundleContext,
-                final ServiceReference<BindingIndependentMappingService> serviceRef,
-                final BindingIndependentMappingService delegate) {
-            this.bundleContext = Preconditions.checkNotNull(bundleContext);
-            this.reference = Preconditions.checkNotNull(serviceRef);
-            this.delegate = Preconditions.checkNotNull(delegate);
-        }
-
-        @Override
-        public CodecRegistry getCodecRegistry() {
-            return delegate.getCodecRegistry();
-        }
-
-        @Override
-        public CompositeNode toDataDom(final DataObject data) {
-            return delegate.toDataDom(data);
-        }
-
-        @Override
-        public Entry<YangInstanceIdentifier, CompositeNode> toDataDom(
-                final Entry<InstanceIdentifier<? extends DataObject>, DataObject> entry) {
-            return delegate.toDataDom(entry);
-        }
-
-        @Override
-        public YangInstanceIdentifier toDataDom(final InstanceIdentifier<? extends DataObject> path) {
-            return delegate.toDataDom(path);
-        }
-
-        @Override
-        public DataObject dataObjectFromDataDom(
-                final InstanceIdentifier<? extends DataObject> path,
-                final CompositeNode result) throws DeserializationException {
-            return delegate.dataObjectFromDataDom(path, result);
-        }
-
-        @Override
-        public InstanceIdentifier<?> fromDataDom(final YangInstanceIdentifier entry)
-                throws DeserializationException {
-            return delegate.fromDataDom(entry);
-        }
-
-        @Override
-        public Set<QName> getRpcQNamesFor(final Class<? extends RpcService> service) {
-            return delegate.getRpcQNamesFor(service);
-        }
-
-        @Override
-        public Optional<Class<? extends RpcService>> getRpcServiceClassFor(final String namespace, final String revision) {
-            return delegate.getRpcServiceClassFor(namespace,revision);
-        }
-
-        @Override
-        public DataContainer dataObjectFromDataDom(final Class<? extends DataContainer> inputClass, final CompositeNode domInput) {
-            return delegate.dataObjectFromDataDom(inputClass, domInput);
-        }
-
-        @Override
-        public void close() {
-            if(delegate != null) {
-                delegate = null;
-
-                try {
-                    bundleContext.ungetService(reference);
-                } catch (IllegalStateException e) {
-                    // Indicates the BundleContext is no longer valid which can happen normally on shutdown.
-                    LOG.debug( "Error unregistering service", e );
-                }
-
-                bundleContext= null;
-                reference = null;
-            }
-        }
-
-        @Override
-        public BindingIndependentMappingService getDelegate() {
-            return delegate;
-        }
-    }
 }
index d4b1d84aa77c5d648291dba26025bad8511618a8..273155bcf71a275b7335ad322cde99b92191922a 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 fefd85b44b2888b2edde8108d6f67029c89bb8d8..01cd1f88ba0e29f5391ac3a07330cc10fb940606 100644 (file)
@@ -52,7 +52,6 @@
       <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-test-model</artifactId>
-          <version>1.2.0-SNAPSHOT</version>
       </dependency>
   </dependencies>
   <build>
index 54a1fe7a95d75ae31c84ed4dec696d886d2692d1..f6d7dbab1a32255f2ee24171e410c1170974338d 100644 (file)
@@ -55,7 +55,6 @@
     <dependency>
       <groupId>com.google.code.findbugs</groupId>
       <artifactId>jsr305</artifactId>
-      <version>2.0.1</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
     <dependency>
       <groupId>xmlunit</groupId>
       <artifactId>xmlunit</artifactId>
-      <version>1.5</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
       <dependency>
       <dependency>
           <groupId>xmlunit</groupId>
           <artifactId>xmlunit</artifactId>
-          <version>1.5</version>
       </dependency>
 
       <dependency>
       <dependency>
           <groupId>org.slf4j</groupId>
           <artifactId>slf4j-simple</artifactId>
-          <version>${slf4j.version}</version>
           <scope>test</scope>
       </dependency>
       <dependency>
           <groupId>com.google.code.findbugs</groupId>
           <artifactId>jsr305</artifactId>
-          <version>2.0.1</version>
       </dependency>
       <dependency>
           <groupId>com.codahale.metrics</groupId>
index 0d139f9670fb5365819d36cccd4050b04e6d5a1c..48afe40607907786ebddd2260746bd18f9a2f9c3 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 458f379f845904786a77d992c87b1e1f3bbe5c2c..7517efeb9028f5df15349a62e74eadb4bf91f15e 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 32f3be82fcd0648e35796c5e3c835332825a20e9..fd53b0f9723e19dd1fde9310fd2988c4c90d6b9b 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 public class NormalizedNodeGetter implements
     NormalizedNodeVisitor {
     private final String path;
-    NormalizedNode output;
+    NormalizedNode<?, ?> output;
 
     public NormalizedNodeGetter(String path){
         Preconditions.checkNotNull(path);
@@ -24,7 +24,7 @@ public class NormalizedNodeGetter implements
     }
 
     @Override
-    public void visitNode(int level, String parentPath, NormalizedNode normalizedNode) {
+    public void visitNode(int level, String parentPath, NormalizedNode<?, ?> normalizedNode) {
         String nodePath = parentPath + "/"+ PathUtils.toString(normalizedNode.getIdentifier());
 
         if(nodePath.toString().equals(path)){
@@ -32,7 +32,7 @@ public class NormalizedNodeGetter implements
         }
     }
 
-    public NormalizedNode getOutput(){
+    public NormalizedNode<?, ?> getOutput(){
         return output;
     }
 }
index 0083b00403ac9d1746559fa8b23b562985fc14d1..f8019c91868f8d559f3a3c1cda8762de3cf48666 100644 (file)
@@ -67,7 +67,7 @@ public class NormalizedNodeNavigator {
     String newParentPath = parentPath + "/" + node.getIdentifier().toString();
 
     final Iterable<? extends NormalizedNode<?, ?>> value = node.getValue();
-    for(NormalizedNode normalizedNode : value){
+    for(NormalizedNode<?, ?> normalizedNode : value){
       if(normalizedNode instanceof MixinNode && normalizedNode instanceof NormalizedNodeContainer){
         navigateNormalizedNodeContainerMixin(level + 1, newParentPath, (NormalizedNodeContainer) normalizedNode);
       } else {
@@ -81,7 +81,7 @@ public class NormalizedNodeNavigator {
   private void navigateNormalizedNode(int level, String parentPath, NormalizedNode<?,?> normalizedNode){
     if(normalizedNode instanceof DataContainerNode){
 
-      final DataContainerNode<?> dataContainerNode = (DataContainerNode) normalizedNode;
+      final DataContainerNode<?> dataContainerNode = (DataContainerNode<?>) normalizedNode;
 
       navigateDataContainerNode(level + 1, parentPath, dataContainerNode);
     } else {
index d370eb2deb5fc8ae6a9042e20f778454954e6314..5f10800e348d92d0d481258ad3e578364a754252 100644 (file)
@@ -25,7 +25,7 @@ public class NormalizedNodePrinter implements NormalizedNodeVisitor {
     }
 
     @Override
-    public void visitNode(int level, String parentPath, NormalizedNode normalizedNode) {
+    public void visitNode(int level, String parentPath, NormalizedNode<?, ?> normalizedNode) {
         System.out.println(spaces((level) * 4) + normalizedNode.getClass().toString() + ":" + normalizedNode.getIdentifier());
         if(normalizedNode instanceof LeafNode || normalizedNode instanceof LeafSetEntryNode){
             System.out.println(spaces((level) * 4) + " parentPath = " + parentPath);
index 9e85ccb9ab24c3c90920736ccd6c6a5213ac31b3..9e847d94ce661cc9721f6fcfe73dcee5334e612a 100644 (file)
@@ -13,5 +13,5 @@ package org.opendaylight.controller.cluster.datastore.node.utils;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 public interface NormalizedNodeVisitor {
-    public void visitNode(int level, String parentPath, NormalizedNode normalizedNode);
+    public void visitNode(int level, String parentPath, NormalizedNode<?, ?> normalizedNode);
 }
index 15d51e1d80aed557a98279e606aba21d2034fde9..fae7eb1a33434bdc52fc3534fe3ee45eee553870 100644 (file)
@@ -81,12 +81,12 @@ public class NormalizedNodeSerializer {
      * @param node
      * @return
      */
-    public static NormalizedNodeMessages.Node serialize(NormalizedNode node){
+    public static NormalizedNodeMessages.Node serialize(NormalizedNode<?, ?> node){
         Preconditions.checkNotNull(node, "node should not be null");
         return new Serializer(node).serialize();
     }
 
-    public static Serializer newSerializer(NormalizedNode node) {
+    public static Serializer newSerializer(NormalizedNode<?, ?> node) {
         Preconditions.checkNotNull(node, "node should not be null");
         return new Serializer(node);
     }
@@ -97,7 +97,7 @@ public class NormalizedNodeSerializer {
      * @param node
      * @return
      */
-    public static NormalizedNode deSerialize(NormalizedNodeMessages.Node node) {
+    public static NormalizedNode<?, ?> deSerialize(NormalizedNodeMessages.Node node) {
         Preconditions.checkNotNull(node, "node should not be null");
         return new DeSerializer(null, node).deSerialize();
     }
@@ -131,11 +131,11 @@ public class NormalizedNodeSerializer {
     public static class Serializer extends QNameSerializationContextImpl
                                    implements NormalizedNodeSerializationContext {
 
-        private final NormalizedNode node;
+        private final NormalizedNode<?, ?> node;
 
         private NormalizedNodeMessages.InstanceIdentifier serializedPath;
 
-        private Serializer(NormalizedNode node) {
+        private Serializer(NormalizedNode<?, ?> node) {
             this.node = node;
         }
 
@@ -154,7 +154,7 @@ public class NormalizedNodeSerializer {
         }
 
         private NormalizedNodeMessages.Node.Builder serialize(
-            NormalizedNode node) {
+            NormalizedNode<?, ?> node) {
             NormalizedNodeMessages.Node.Builder builder =
                 NormalizedNodeMessages.Node.newBuilder();
 
@@ -183,13 +183,13 @@ public class NormalizedNodeSerializer {
 
                 for (Object o : iterable) {
                     if (o instanceof NormalizedNode) {
-                        builder.addChild(serialize((NormalizedNode) o));
+                        builder.addChild(serialize((NormalizedNode<?, ?>) o));
                     }
                 }
 
             } else if (value instanceof NormalizedNode) {
 
-                builder.addChild(serialize((NormalizedNode) value));
+                builder.addChild(serialize((NormalizedNode<?, ?>) value));
 
             } else {
 
@@ -208,7 +208,7 @@ public class NormalizedNodeSerializer {
         static {
             deSerializationFunctions.put(CONTAINER_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         DataContainerNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, ContainerNode>
@@ -226,7 +226,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(LEAF_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, Object, LeafNode<Object>>
@@ -243,7 +243,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(MAP_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         CollectionNodeBuilder<MapEntryNode, MapNode>
@@ -255,7 +255,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(MAP_ENTRY_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         DataContainerNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifierWithPredicates, MapEntryNode>
@@ -270,7 +270,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(AUGMENTATION_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         DataContainerNodeBuilder<YangInstanceIdentifier.AugmentationIdentifier, AugmentationNode>
@@ -286,7 +286,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(LEAF_SET_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         ListNodeBuilder<Object, LeafSetEntryNode<Object>>
@@ -298,7 +298,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(LEAF_SET_ENTRY_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeWithValue, Object, LeafSetEntryNode<Object>>
@@ -313,7 +313,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(CHOICE_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifier, ChoiceNode>
@@ -330,7 +330,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(ORDERED_LEAF_SET_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         ListNodeBuilder<Object, LeafSetEntryNode<Object>>
@@ -345,7 +345,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(ORDERED_MAP_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         CollectionNodeBuilder<MapEntryNode, OrderedMapNode>
@@ -358,7 +358,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(UNKEYED_LIST_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         CollectionNodeBuilder<UnkeyedListEntryNode, UnkeyedListNode>
@@ -371,7 +371,7 @@ public class NormalizedNodeSerializer {
 
             deSerializationFunctions.put(UNKEYED_LIST_ENTRY_NODE_TYPE,
                 new DeSerializationFunction() {
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         DataContainerNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, UnkeyedListEntryNode>
@@ -389,7 +389,7 @@ public class NormalizedNodeSerializer {
             deSerializationFunctions.put(ANY_XML_NODE_TYPE,
                 new DeSerializationFunction() {
 
-                    @Override public NormalizedNode apply(
+                    @Override public NormalizedNode<?, ?> apply(
                         DeSerializer deSerializer,
                         NormalizedNodeMessages.Node node) {
                         NormalizedNodeAttrBuilder<YangInstanceIdentifier.NodeIdentifier, Node<?>, AnyXmlNode>
@@ -421,8 +421,8 @@ public class NormalizedNodeSerializer {
             return deserializedPath;
         }
 
-        public NormalizedNode deSerialize() {
-            NormalizedNode deserializedNode = deSerialize(node);
+        public NormalizedNode<?, ?> deSerialize() {
+            NormalizedNode<?, ?> deserializedNode = deSerialize(node);
             if(path != null) {
                 deserializedPath = InstanceIdentifierUtils.fromSerializable(path, this);
             }
@@ -430,7 +430,7 @@ public class NormalizedNodeSerializer {
             return deserializedNode;
         }
 
-        private NormalizedNode deSerialize(NormalizedNodeMessages.Node node){
+        private NormalizedNode<?, ?> deSerialize(NormalizedNodeMessages.Node node){
             Preconditions.checkNotNull(node, "node should not be null");
 
             DeSerializationFunction deSerializationFunction = deSerializationFunctions.get(
@@ -440,7 +440,7 @@ public class NormalizedNodeSerializer {
         }
 
 
-        private NormalizedNode buildCollectionNode(
+        private NormalizedNode<?, ?> buildCollectionNode(
             CollectionNodeBuilder builder,
             NormalizedNodeMessages.Node node) {
 
@@ -454,7 +454,7 @@ public class NormalizedNodeSerializer {
         }
 
 
-        private NormalizedNode buildListNode(
+        private NormalizedNode<?, ?> buildListNode(
             ListNodeBuilder<Object, LeafSetEntryNode<Object>> builder,
             NormalizedNodeMessages.Node node) {
             builder.withNodeIdentifier(toNodeIdentifier(node.getPathArgument()));
@@ -466,7 +466,7 @@ public class NormalizedNodeSerializer {
             return builder.build();
         }
 
-        private NormalizedNode buildDataContainer(DataContainerNodeBuilder builder, NormalizedNodeMessages.Node node){
+        private NormalizedNode<?, ?> buildDataContainer(DataContainerNodeBuilder builder, NormalizedNodeMessages.Node node){
 
             for(NormalizedNodeMessages.Node child : node.getChildList()){
                 builder.withChild((DataContainerChild<?, ?>) deSerialize(child));
@@ -477,7 +477,7 @@ public class NormalizedNodeSerializer {
             return builder.build();
         }
 
-        private NormalizedNode buildNormalizedNode(NormalizedNodeAttrBuilder builder, NormalizedNodeMessages.Node node){
+        private NormalizedNode<?, ?> buildNormalizedNode(NormalizedNodeAttrBuilder builder, NormalizedNodeMessages.Node node){
 
             builder.withValue(ValueSerializer.deSerialize(this, node));
 
@@ -515,7 +515,7 @@ public class NormalizedNodeSerializer {
         }
 
         private static interface DeSerializationFunction {
-            NormalizedNode apply(DeSerializer deserializer, NormalizedNodeMessages.Node node);
+            NormalizedNode<?, ?> apply(DeSerializer deserializer, NormalizedNodeMessages.Node node);
         }
     }
 }
index 2d6d738b76b981c2aad11eef308edcfe2d2434e5..b7460e8acf52bc5740627f4660f0b8e341ac4395 100644 (file)
@@ -39,7 +39,7 @@ public enum NormalizedNodeType {
     UNKEYED_LIST_ENTRY_NODE_TYPE,
     ANY_XML_NODE_TYPE;
 
-    public static NormalizedNodeType getSerializableNodeType(NormalizedNode node){
+    public static NormalizedNodeType getSerializableNodeType(NormalizedNode<?, ?> node){
         Preconditions.checkNotNull(node, "node should not be null");
 
         if(node instanceof LeafNode){
index aac45e18b5d7c420eeae0f6d47b62fdee6cb3078..bb7f9c35eead01ba942327486d0f0306913aaac7 100644 (file)
@@ -28,7 +28,7 @@ public class ValueSerializer {
             builder.setInstanceIdentifierValue(
                 InstanceIdentifierUtils.toSerializable((YangInstanceIdentifier) value, context));
         } else if(value instanceof Set) {
-            Set set = (Set) value;
+            Set<?> set = (Set<?>) value;
             if (!set.isEmpty()) {
                 for (Object o : set) {
                     if (o instanceof String) {
@@ -59,7 +59,7 @@ public class ValueSerializer {
             return InstanceIdentifierUtils.fromSerializable(
                     node.getInstanceIdentifierValue(), context);
         } else if(node.getIntValueType() == ValueType.BITS_TYPE.ordinal()){
-            return new HashSet(node.getBitsValueList());
+            return new HashSet<>(node.getBitsValueList());
         } else if(node.getIntValueType() == ValueType.BINARY_TYPE.ordinal()){
             return node.getBytesValue().toByteArray();
         }
index 6c884734e298a54dea541fe4973404365db41573..2007544b7edd96d3498d303e3ad0ffd8469ada36 100644 (file)
@@ -32,7 +32,7 @@ public enum ValueType {
     BIG_DECIMAL_TYPE,
     BINARY_TYPE;
 
-    private static Map<Class, ValueType> types = new HashMap<>();
+    private static Map<Class<?>, ValueType> types = new HashMap<>();
 
     static {
         types.put(String.class, STRING_TYPE);
index b59a32efc9bd96e0bd4ad157b0faa565dafa948b..797258b4438cc61825524136ecb0b6aa4ff2aa5e 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 cbd7bf885373b331fb71a9d6899efc755b85f767..08567fd79ee9e4980dc6a359ae6fab422040b03d 100644 (file)
@@ -204,7 +204,7 @@ public class NormalizedNodeOutputStreamWriter implements NormalizedNodeStreamWri
         }
     }
 
-    private void writeObjSet(Set set) throws IOException {
+    private void writeObjSet(Set<?> set) throws IOException {
         if(!set.isEmpty()){
             writer.writeInt(set.size());
             for(Object o : set){
@@ -329,7 +329,7 @@ public class NormalizedNodeOutputStreamWriter implements NormalizedNodeStreamWri
                 writer.writeShort((Short) value);
                 break;
             case ValueTypes.BITS_TYPE:
-                writeObjSet((Set) value);
+                writeObjSet((Set<?>) value);
                 break;
             case ValueTypes.YANG_IDENTIFIER_TYPE:
                 writeYangInstanceIdentifier((YangInstanceIdentifier) value);
index 6035e3c644e6f9c6d54e0219fcdad66037acd303..80fa527b4613e54d942aa14cc121c3cf234dd410 100644 (file)
@@ -31,7 +31,7 @@ public class ValueTypes {
     public static final byte BIG_INTEGER_TYPE = 10;
     public static final byte BIG_DECIMAL_TYPE = 11;
 
-    private static Map<Class, Byte> types = new HashMap<>();
+    private static Map<Class<?>, Byte> types = new HashMap<>();
 
     static {
         types.put(String.class, Byte.valueOf(STRING_TYPE));
index 5d5318f19a050bcb3b5c1e4550304f011ac8f40d..0b408e2e1e1d6d9358750d951893abf85e3d8483 100644 (file)
@@ -60,7 +60,7 @@ public class NormalizedNodeToNodeCodecTest {
         PathUtils.toString(YangInstanceIdentifier.builder().build()), documentOne);
 
     // Validate the value of id can be retrieved from the normalized node
-    NormalizedNode output = normalizedNodeGetter.getOutput();
+    NormalizedNode<?, ?> output = normalizedNodeGetter.getOutput();
     assertNotNull(output);
 
 
index d1e3eb202f8faefcafeb548cf2b48ca013b42e91..75e8e2aa4a45c2106b5ccb70baa5a0220b667e74 100644 (file)
@@ -1,15 +1,13 @@
 package org.opendaylight.controller.cluster.datastore.node.utils;
 
+import com.google.common.collect.ImmutableSet;
 import org.junit.Test;
 import org.opendaylight.controller.cluster.datastore.util.TestModel;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-
 import static junit.framework.TestCase.assertEquals;
 
 public class PathUtilsTest {
@@ -92,8 +90,7 @@ public class PathUtilsTest {
     }
 
     private YangInstanceIdentifier.AugmentationIdentifier augmentationIdentifier(){
-        Set<QName> childNames = new HashSet();
-        childNames.add(QNameFactory.create("(urn:opendaylight:flow:table:statistics?revision=2013-12-15)flow-table-statistics"));
+        Set<QName> childNames = ImmutableSet.of(QNameFactory.create("(urn:opendaylight:flow:table:statistics?revision=2013-12-15)flow-table-statistics"));
 
         return new YangInstanceIdentifier.AugmentationIdentifier(childNames);
     }
index bcc0fd85d0f343f7b1e9ec02ed6c4a6aec1f4027..816442f885ff33197166971e05b4fce70dbacce7 100644 (file)
@@ -45,7 +45,7 @@ public class NormalizedNodeSerializerTest {
 
         start = System.nanoTime();
 
-        NormalizedNode actualNode =
+        NormalizedNode<?, ?> actualNode =
             NormalizedNodeSerializer.deSerialize(expected);
 
         System.out.println("DeSerialize Time = " + (System.nanoTime() - start)/1000000);
index 88c269507538ab8f55d40cb06eece12c6a39ac0e..d0be36beebbc8696e6e5b3a7d7416d18a8b7e40c 100644 (file)
@@ -355,8 +355,8 @@ public class ValueSerializerTest{
                 nodeBuilder.build());
 
         assertTrue(o instanceof Set);
-        assertTrue(((Set)o).contains("foo"));
-        assertTrue(((Set) o).contains("bar"));
+        assertTrue(((Set<?>)o).contains("foo"));
+        assertTrue(((Set<?>) o).contains("bar"));
 
     }
 
index 6cd06e9c1cea610edc3b1fa2799513cfa539c72c..d15f534f805ee5bc345afcfb05be903f0f9e85e0 100644 (file)
@@ -10,6 +10,7 @@
 
 package org.opendaylight.controller.cluster.datastore.util;
 
+import com.google.common.collect.ImmutableSet;
 import org.junit.Assert;
 import org.junit.Test;
 import org.opendaylight.controller.cluster.datastore.node.utils.serialization.QNameDeSerializationContext;
@@ -20,7 +21,6 @@ import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashSet;
 import java.util.List;
 
 public class InstanceIdentifierUtilsTest {
@@ -116,8 +116,8 @@ public class InstanceIdentifierUtilsTest {
 
     @Test
     public void testAugmentationIdentifier() {
-        YangInstanceIdentifier.PathArgument p1 = new YangInstanceIdentifier.AugmentationIdentifier(new HashSet(
-                Arrays.asList(TEST_QNAME)));
+        YangInstanceIdentifier.PathArgument p1 = new YangInstanceIdentifier.AugmentationIdentifier(
+            ImmutableSet.of(TEST_QNAME));
 
         List<YangInstanceIdentifier.PathArgument> arguments = new ArrayList<>();
 
index 2e671e3ce2f267807837225c95376847c6116eb8..87959efe8ae2def5684e253f2e0840c7177db838 100644 (file)
@@ -11,11 +11,9 @@ package org.opendaylight.controller.cluster.datastore;
 import akka.actor.ActorSelection;
 import akka.dispatch.OnComplete;
 import com.google.common.base.Preconditions;
-import java.util.AbstractMap.SimpleEntry;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChain;
 import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionChainClosedException;
@@ -38,39 +36,31 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
     private interface State {
         boolean isReady();
 
-        SimpleEntry<Object, List<Future<ActorSelection>>> getReadyFutures();
-
-        void setReadyFutures(Object txIdentifier, List<Future<ActorSelection>> readyFutures);
+        List<Future<ActorSelection>> getPreviousReadyFutures();
     }
 
     private static class Allocated implements State {
-        private volatile SimpleEntry<Object, List<Future<ActorSelection>>> readyFutures;
+        private final ChainedTransactionProxy transaction;
 
-        @Override
-        public boolean isReady() {
-            return readyFutures != null;
+        Allocated(ChainedTransactionProxy transaction) {
+            this.transaction = transaction;
         }
 
         @Override
-        public SimpleEntry<Object, List<Future<ActorSelection>>> getReadyFutures() {
-            return readyFutures != null ? readyFutures : EMPTY_READY_FUTURES;
+        public boolean isReady() {
+            return transaction.isReady();
         }
 
         @Override
-        public void setReadyFutures(Object txIdentifier, List<Future<ActorSelection>> readyFutures) {
-            this.readyFutures = new SimpleEntry<>(txIdentifier, readyFutures);
+        public List<Future<ActorSelection>> getPreviousReadyFutures() {
+            return transaction.getReadyFutures();
         }
     }
 
     private static abstract class AbstractDefaultState implements State {
         @Override
-        public SimpleEntry<Object, List<Future<ActorSelection>>> getReadyFutures() {
-            return EMPTY_READY_FUTURES;
-        }
-
-        @Override
-        public void setReadyFutures(Object txIdentifier, List<Future<ActorSelection>> readyFutures) {
-            throw new IllegalStateException("No transaction is allocated");
+        public List<Future<ActorSelection>> getPreviousReadyFutures() {
+            return Collections.emptyList();
         }
     }
 
@@ -88,21 +78,15 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
         }
     };
 
-    private static final SimpleEntry<Object, List<Future<ActorSelection>>> EMPTY_READY_FUTURES =
-            new SimpleEntry<Object, List<Future<ActorSelection>>>("",
-                    Collections.<Future<ActorSelection>>emptyList());
-
-    private static final AtomicReferenceFieldUpdater<TransactionChainProxy, State> STATE_UPDATER =
-            AtomicReferenceFieldUpdater.newUpdater(TransactionChainProxy.class, State.class, "state");
+    private static final AtomicInteger counter = new AtomicInteger(0);
 
     private final ActorContext actorContext;
     private final String transactionChainId;
-    private volatile State state = IDLE_STATE;
-    private static final AtomicInteger counter = new AtomicInteger(0);
+    private volatile State currentState = IDLE_STATE;
 
     public TransactionChainProxy(ActorContext actorContext) {
         this.actorContext = actorContext;
-        transactionChainId = actorContext.getCurrentMemberName() + "-transaction-chain-" + counter.incrementAndGet();
+        transactionChainId = actorContext.getCurrentMemberName() + "-txn-chain-" + counter.incrementAndGet();
     }
 
     public String getTransactionChainId() {
@@ -111,8 +95,11 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
 
     @Override
     public DOMStoreReadTransaction newReadOnlyTransaction() {
-        checkReadyState();
-        return new ChainedTransactionProxy(actorContext, TransactionProxy.TransactionType.READ_ONLY);
+        State localState = currentState;
+        checkReadyState(localState);
+
+        return new ChainedTransactionProxy(actorContext, TransactionProxy.TransactionType.READ_ONLY,
+                transactionChainId, localState.getPreviousReadyFutures());
     }
 
     @Override
@@ -127,36 +114,61 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
 
     @Override
     public void close() {
-        state = CLOSED_STATE;
+        currentState = CLOSED_STATE;
 
         // Send a close transaction chain request to each and every shard
         actorContext.broadcast(new CloseTransactionChain(transactionChainId));
     }
 
     private ChainedTransactionProxy allocateWriteTransaction(TransactionProxy.TransactionType type) {
-        checkReadyState();
+        State localState = currentState;
+
+        checkReadyState(localState);
 
-        ChainedTransactionProxy txProxy = new ChainedTransactionProxy(actorContext, type);
-        STATE_UPDATER.compareAndSet(this, IDLE_STATE, new Allocated());
+        // Pass the ready Futures from the previous Tx.
+        ChainedTransactionProxy txProxy = new ChainedTransactionProxy(actorContext, type,
+                transactionChainId, localState.getPreviousReadyFutures());
+
+        currentState = new Allocated(txProxy);
 
         return txProxy;
     }
 
-    private void checkReadyState() {
-        Preconditions.checkState(state.isReady(), "Previous transaction %s is not ready yet",
-                state.getReadyFutures().getKey());
+    private void checkReadyState(State state) {
+        Preconditions.checkState(state.isReady(), "Previous transaction is not ready yet");
     }
 
-    private class ChainedTransactionProxy extends TransactionProxy {
+    private static class ChainedTransactionProxy extends TransactionProxy {
+
+        /**
+         * Stores the ready Futures from the previous Tx in the chain.
+         */
+        private final List<Future<ActorSelection>> previousReadyFutures;
+
+        /**
+         * Stores the ready Futures from this transaction when it is readied.
+         */
+        private volatile List<Future<ActorSelection>> readyFutures;
 
-        ChainedTransactionProxy(ActorContext actorContext, TransactionType transactionType) {
+        private ChainedTransactionProxy(ActorContext actorContext, TransactionType transactionType,
+                String transactionChainId, List<Future<ActorSelection>> previousReadyFutures) {
             super(actorContext, transactionType, transactionChainId);
+            this.previousReadyFutures = previousReadyFutures;
+        }
+
+        List<Future<ActorSelection>> getReadyFutures() {
+            return readyFutures;
+        }
+
+        boolean isReady() {
+            return readyFutures != null;
         }
 
         @Override
         protected void onTransactionReady(List<Future<ActorSelection>> readyFutures) {
-            LOG.debug("onTransactionReady {} pending readyFutures size {} chain {}", getIdentifier(), readyFutures.size(), TransactionChainProxy.this.transactionChainId);
-            state.setReadyFutures(getIdentifier(), readyFutures);
+            LOG.debug("onTransactionReady {} pending readyFutures size {} chain {}", getIdentifier(),
+                    readyFutures.size(), getTransactionChainId());
+            this.readyFutures = readyFutures;
         }
 
         /**
@@ -169,32 +181,13 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
                 final Object serializedCreateMessage) {
 
             // Check if there are any previous ready Futures, otherwise let the super class handle it.
-            // The second check is done to ensure the the previous ready Futures aren't for this
-            // Tx instance as deadlock would occur if we tried to wait on our own Futures. This can
-            // occur in this scenario:
-            //
-            //     - the TransactionProxy is created and the client does a write.
-            //
-            //     - the TransactionProxy then attempts to create the shard Tx. However it first
-            //       sends a FindPrimaryShard message to the shard manager to find the local shard
-            //       This call is done async.
-            //
-            //     - the client submits the Tx and the TransactionProxy is readied and we cache
-            //       the ready Futures here.
-            //
-            //     - then the FindPrimaryShard call completes and this method is called to create
-            //       the shard Tx. However the cached Futures were from the ready on this Tx. If we
-            //       tried to wait on them, it would cause a form of deadlock as the ready Future
-            //       would be waiting on the Tx create Future and vice versa.
-            SimpleEntry<Object, List<Future<ActorSelection>>> readyFuturesEntry = state.getReadyFutures();
-            List<Future<ActorSelection>> readyFutures = readyFuturesEntry.getValue();
-            if(readyFutures.isEmpty() || getIdentifier().equals(readyFuturesEntry.getKey())) {
+            if(previousReadyFutures.isEmpty()) {
                 return super.sendCreateTransaction(shard, serializedCreateMessage);
             }
 
             // Combine the ready Futures into 1.
             Future<Iterable<ActorSelection>> combinedFutures = akka.dispatch.Futures.sequence(
-                    readyFutures, actorContext.getActorSystem().dispatcher());
+                    previousReadyFutures, getActorContext().getActorSystem().dispatcher());
 
             // Add a callback for completion of the combined Futures.
             final Promise<Object> createTxPromise = akka.dispatch.Futures.promise();
@@ -205,15 +198,18 @@ public class TransactionChainProxy implements DOMStoreTransactionChain {
                         // A Ready Future failed so fail the returned Promise.
                         createTxPromise.failure(failure);
                     } else {
+                        LOG.debug("Previous Tx readied - sending CreateTransaction for {} on chain {}",
+                                getIdentifier(), getTransactionChainId());
+
                         // Send the CreateTx message and use the resulting Future to complete the
                         // returned Promise.
-                        createTxPromise.completeWith(actorContext.executeOperationAsync(shard,
+                        createTxPromise.completeWith(getActorContext().executeOperationAsync(shard,
                                 serializedCreateMessage));
                     }
                 }
             };
 
-            combinedFutures.onComplete(onComplete, actorContext.getActorSystem().dispatcher());
+            combinedFutures.onComplete(onComplete, getActorContext().getActorSystem().dispatcher());
 
             return createTxPromise.future();
         }
index 226ac75467ff17e7066650e72cb875609bf418cd..443e0af9e031392fe1ebb08d03d956b883b91dab 100644 (file)
@@ -534,6 +534,10 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction {
         return transactionChainId;
     }
 
+    protected ActorContext getActorContext() {
+        return actorContext;
+    }
+
     /**
      * Interface for a transaction operation to be invoked later.
      */
index 4f1a02e43557298c11c78f37a35c16078df4d0d7..9f5aded3521b7c72f9b50fff77a988263f1e039d 100644 (file)
@@ -9,6 +9,8 @@ import akka.actor.PoisonPill;
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Uninterruptibles;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
@@ -633,6 +635,60 @@ public class DistributedDataStoreIntegrationTest extends AbstractActorTest {
         }};
     }
 
+    @Test
+    public void testCreateChainedTransactionsInQuickSuccession() throws Exception{
+        new IntegrationTestKit(getSystem()) {{
+            DistributedDataStore dataStore = setupDistributedDataStore(
+                    "testCreateChainedTransactionsInQuickSuccession", "test-1");
+
+            DOMStoreTransactionChain txChain = dataStore.createTransactionChain();
+
+            NormalizedNode<?, ?> testNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
+
+            int nTxs = 20;
+            List<DOMStoreThreePhaseCommitCohort> cohorts = new ArrayList<>(nTxs);
+            for(int i = 0; i < nTxs; i++) {
+                DOMStoreReadWriteTransaction rwTx = txChain.newReadWriteTransaction();
+
+                rwTx.merge(TestModel.TEST_PATH, testNode);
+
+                cohorts.add(rwTx.ready());
+
+            }
+
+            for(DOMStoreThreePhaseCommitCohort cohort: cohorts) {
+                doCommit(cohort);
+            }
+
+            txChain.close();
+
+            cleanup(dataStore);
+        }};
+    }
+
+    @Test
+    public void testCreateChainedTransactionAfterEmptyTxReadied() throws Exception{
+        new IntegrationTestKit(getSystem()) {{
+            DistributedDataStore dataStore = setupDistributedDataStore(
+                    "testCreateChainedTransactionAfterEmptyTxReadied", "test-1");
+
+            DOMStoreTransactionChain txChain = dataStore.createTransactionChain();
+
+            DOMStoreReadWriteTransaction rwTx1 = txChain.newReadWriteTransaction();
+
+            rwTx1.ready();
+
+            DOMStoreReadWriteTransaction rwTx2 = txChain.newReadWriteTransaction();
+
+            Optional<NormalizedNode<?, ?>> optional = rwTx2.read(TestModel.TEST_PATH).get(5, TimeUnit.SECONDS);
+            assertEquals("isPresent", false, optional.isPresent());
+
+            txChain.close();
+
+            cleanup(dataStore);
+        }};
+    }
+
     @Test
     public void testCreateChainedTransactionWhenPreviousNotReady() throws Throwable {
         new IntegrationTestKit(getSystem()) {{
index 79d5c5116d4617de160f68e7f1952042327715ed..fa15db694904ebef9556994a02ac458d10d654fd 100644 (file)
@@ -30,7 +30,7 @@ class ShardTestKit extends JavaTestKit {
         super(actorSystem);
     }
 
-    protected void waitForLogMessage(final Class logLevel, ActorRef subject, String logMessage){
+    protected void waitForLogMessage(final Class<?> logLevel, ActorRef subject, String logMessage){
         // Wait for a specific log message to show up
         final boolean result =
             new JavaTestKit.EventFilter<Boolean>(logLevel
index dc20296ff52d2fe3256507dc90022ab6a7a89918..264709f687adcb8ab13cf4a7149099324dd9c476 100644 (file)
@@ -45,8 +45,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>sal-inmemory-datastore</artifactId>
-      <version>1.2.0-SNAPSHOT</version>
-
     </dependency>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
@@ -74,7 +72,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index cb1a99b4c0c14122d3ef7c98ae9d5f524523f9db..f1b7261bcb78e41b89cf085888702094e2844707 100644 (file)
@@ -139,7 +139,7 @@ public class BackwardsCompatibleMountPointTest {
 
     private DataNormalizer mockNormalizer() throws DataNormalizationException {
         final DataNormalizer mock = mock(DataNormalizer.class);
-        doReturn(new AbstractMap.SimpleEntry<YangInstanceIdentifier, NormalizedNode<?, ?>>(id, normalizedNode) {})
+        doReturn(new AbstractMap.SimpleEntry<YangInstanceIdentifier, NormalizedNode<?, ?>>(id, normalizedNode))
                 .when(mock).toNormalized(any(YangInstanceIdentifier.class), any(CompositeNode.class));
         doReturn(compositeNode).when(mock).toLegacy(any(YangInstanceIdentifier.class), any(NormalizedNode.class));
         doReturn(id).when(mock).toLegacy(any(YangInstanceIdentifier.class));
index ecea744d14418fdb03216dab312f82c1d0fad1c0..ad4bd46d719e6dbf286f3dafd408c38dd4fbece4 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 7b51d03a97aaa6c9a9d1592eb5ba963ec63e6d8c..867c7a47b5af6996c802394e98735e34a47a56c0 100644 (file)
@@ -163,23 +163,23 @@ public class XSQLBluePrint implements DatabaseMetaData, Serializable {
         return cacheLoadedSuccessfuly;
     }
 
-    private static Map<Class, Set<Class>> superClassMap = new HashMap<Class, Set<Class>>();
+    private static Map<Class<?>, Set<Class<?>>> superClassMap = new HashMap<>();
 
-    public static Set<Class> getInheritance(Class myObjectClass,
-            Class returnType) {
+    public static Set<Class<?>> getInheritance(Class<?> myObjectClass,
+            Class<?> returnType) {
 
         if (returnType != null && myObjectClass.equals(returnType)) {
-            return new HashSet<Class>();
+            return new HashSet<>();
         }
-        Set<Class> result = superClassMap.get(myObjectClass);
+        Set<Class<?>> result = superClassMap.get(myObjectClass);
         if (result != null) {
             return result;
         }
-        result = new HashSet<Class>();
+        result = new HashSet<>();
         superClassMap.put(myObjectClass, result);
         if (returnType != null) {
             if (!returnType.equals(myObjectClass)) {
-                Class mySuperClass = myObjectClass.getSuperclass();
+                Class<?> mySuperClass = myObjectClass.getSuperclass();
                 while (mySuperClass != null) {
                     result.add(mySuperClass);
                     mySuperClass = mySuperClass.getSuperclass();
@@ -190,11 +190,11 @@ public class XSQLBluePrint implements DatabaseMetaData, Serializable {
         return result;
     }
 
-    public static Set<Class> collectInterfaces(Class cls) {
-        Set<Class> result = new HashSet();
-        Class myInterfaces[] = cls.getInterfaces();
+    public static Set<Class<?>> collectInterfaces(Class<?> cls) {
+        Set<Class<?>> result = new HashSet<>();
+        Class<?> myInterfaces[] = cls.getInterfaces();
         if (myInterfaces != null) {
-            for (Class in : myInterfaces) {
+            for (Class<?> in : myInterfaces) {
                 result.add(in);
                 result.addAll(collectInterfaces(in));
             }
@@ -213,20 +213,20 @@ public class XSQLBluePrint implements DatabaseMetaData, Serializable {
         map.put(blNode.getBluePrintNodeName(), blNode);
     }
 
-    public Class getGenericType(ParameterizedType type) {
+    public Class<?> getGenericType(ParameterizedType type) {
         Type[] typeArguments = type.getActualTypeArguments();
         for (Type typeArgument : typeArguments) {
             if (typeArgument instanceof ParameterizedType) {
                 ParameterizedType pType = (ParameterizedType) typeArgument;
-                return (Class) pType.getRawType();
+                return (Class<?>) pType.getRawType();
             } else if (typeArgument instanceof Class) {
-                return (Class) typeArgument;
+                return (Class<?>) typeArgument;
             }
         }
         return null;
     }
 
-    public Class getMethodReturnTypeFromGeneric(Method m) {
+    public Class<?> getMethodReturnTypeFromGeneric(Method m) {
         Type rType = m.getGenericReturnType();
         if (rType instanceof ParameterizedType) {
             return getGenericType((ParameterizedType) rType);
index 8d905f208132aed258886a58b5c01ab56682e76c..8e9ed3a26b804a4da028e75849d69a8387352e33 100644 (file)
@@ -85,7 +85,7 @@ public class XSQLBluePrintNode implements Serializable {
         this.children.add(ch);
     }
 
-    public boolean isModelChild(Class p) {
+    public boolean isModelChild(Class<?> p) {
         if (this.relations.size() == 0) {
             return false;
         }
@@ -227,7 +227,7 @@ public class XSQLBluePrintNode implements Serializable {
         return "Unknown";
     }
 
-    public Class getInterface() {
+    public Class<?> getInterface() {
         return this.myInterface;
     }
 
index 1cb3aa555948809c20ab3034e0acb4dd95632ae7..38a96dc45737bf5f0d82382a62c071af98940d78 100644 (file)
@@ -80,20 +80,20 @@ public class XSQLBluePrintRelation implements Serializable {
         }
     }
 
-    public List execute(Object o) {
-        List result = new LinkedList();
+    public List<?> execute(Object o) {
+        List<Object> result = new LinkedList<>();
         if (o == null) {
             return null;
         }
 
         if (Set.class.isAssignableFrom(o.getClass())) {
-            Set lst = (Set) o;
+            Set<?> lst = (Set<?>) o;
             for (Object oo : lst) {
                 addToResult(result, execute(oo));
             }
             return result;
         } else if (List.class.isAssignableFrom(o.getClass())) {
-            List lst = (List) o;
+            List<?> lst = (List<?>) o;
             for (Object oo : lst) {
                 addToResult(result, execute(oo));
             }
@@ -111,17 +111,17 @@ public class XSQLBluePrintRelation implements Serializable {
         return result;
     }
 
-    public static void addToResult(List result, Object o) {
+    private static void addToResult(List<Object> result, Object o) {
         if (o == null) {
             return;
         }
         if (Set.class.isAssignableFrom(o.getClass())) {
-            Set lst = (Set) o;
+            Set<?> lst = (Set<?>) o;
             for (Object oo : lst) {
                 result.add(oo);
             }
         } else if (List.class.isAssignableFrom(o.getClass())) {
-            List lst = (List) o;
+            List<?> lst = (List<?>) o;
             for (Object oo : lst) {
                 result.add(oo);
             }
index 4c6cca7fa612d9d00be8bdb47f8f6dd52f339b94..d3d57bd814b104f64c2529f5e07c7c9e822349bd 100644 (file)
@@ -6,7 +6,7 @@ public class XSQLColumn implements Serializable, Comparable {
     private String name = null;
     private String tableName = null;
     private int charWidth = -1;
-    private Class type = null;
+    private Class<?> type = null;
     private transient Object bluePrintNode = null;
     private String origName = null;
     private String origTableName = null;
index 6a27230664bb2514222dcc7695ec1a267280c1d3..17b8ae5f291e7a12f425dd20a96010ddb165af20 100644 (file)
@@ -32,7 +32,7 @@ public class XSQLODLUtils {
         types.put(Status.class, Status.class);
     }
 
-    public static boolean isColumnType(Class cls) {
+    public static boolean isColumnType(Class<?> cls) {
         return types.containsKey(cls);
     }
 
@@ -229,7 +229,7 @@ public class XSQLODLUtils {
         return "NULL";
     }
 
-    public static Class getTypeForODLColumn(Object odlNode){
+    public static Class<?> getTypeForODLColumn(Object odlNode){
         Object type = get(odlNode,"type");
         if(type instanceof Uint32 || type instanceof Uint64){
             return long.class;
index 021f6ee19b7d0bfdb71cdfc8f954783191e99f4f..e47bf870cc341eefc64b3ca0d827d5313ef9c927 100644 (file)
@@ -127,7 +127,7 @@ public class JDBCResultSet implements Serializable, ResultSet,
         return 1;
     }
 
-    public int isObjectFitCriteria(Object element, Class cls) {
+    public int isObjectFitCriteria(Object element, Class<?> cls) {
         Map<XSQLColumn, List<XSQLCriteria>> tblCriteria = criteria.get(cls
                 .getName());
         if (tblCriteria == null) {
index d16f67209f1cb152e9d332525f682c1225b44d91..ec5bb215bf991936c2f666c827d0292f048e0c80 100644 (file)
       <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
       <dependency>
index 13cec54175758fdea10a61a3902eef84e2a3198d..dde1861a06214d696fcc3e348dfdf25769ebc9b4 100644 (file)
@@ -15,10 +15,10 @@ import org.slf4j.LoggerFactory;
 
 public class ConditionalProbe {
     private final ActorRef actorRef;
-    private final Predicate predicate;
+    private final Predicate<Object> predicate;
     Logger log = LoggerFactory.getLogger(ConditionalProbe.class);
 
-    public ConditionalProbe(ActorRef actorRef, Predicate predicate) {
+    public ConditionalProbe(ActorRef actorRef, Predicate<Object> predicate) {
         this.actorRef = actorRef;
         this.predicate = predicate;
     }
index f6f720eed0f62dd50393c3275c6e7d9cc8fab23d..ee96cb897fccd45239badad8cef7a0a161edd467 100644 (file)
@@ -200,11 +200,11 @@ public class RpcRegistryTest {
         Messages.BucketStoreMessages.UpdateRemoteBuckets.class);
   }
 
-  private JavaTestKit createProbeForMessage(ActorSystem node, ActorPath subjectPath, final Class clazz) {
+  private JavaTestKit createProbeForMessage(ActorSystem node, ActorPath subjectPath, final Class<?> clazz) {
     final JavaTestKit probe = new JavaTestKit(node);
 
     ConditionalProbe conditionalProbe =
-        new ConditionalProbe(probe.getRef(), new Predicate() {
+        new ConditionalProbe(probe.getRef(), new Predicate<Object>() {
           @Override
           public boolean apply(@Nullable Object input) {
               if (input != null)
index e61b54f067e7bcba09a0ef7d476f7cd3b04c938d..cf42ebf1ccd4de520c4d5f4036f9a3e67cd75275 100644 (file)
@@ -71,7 +71,7 @@ public class GossiperTest {
     @Test
     public void testReceiveGossipTick_WhenNoRemoteMemberShouldIgnore(){
 
-        mockGossiper.setClusterMembers(Collections.EMPTY_LIST);
+        mockGossiper.setClusterMembers(Collections.<Address>emptyList());
         doNothing().when(mockGossiper).getLocalStatusAndSendTo(any(Address.class));
         mockGossiper.receiveGossipTick();
         verify(mockGossiper, times(0)).getLocalStatusAndSendTo(any(Address.class));
index 5abb4f891043076d673cc416f867c57470b69f87..3d3c52d7d1237375e5483d2eccadde7d29736f07 100644 (file)
   <artifactId>sal-rest-docgen</artifactId>
   <packaging>bundle</packaging>
 
-  <properties>
-    <jaxrs-api.version>3.0.4.Final</jaxrs-api.version>
-  </properties>
-
   <dependencies>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
@@ -42,7 +38,6 @@
     <dependency>
       <groupId>org.jboss.resteasy</groupId>
       <artifactId>jaxrs-api</artifactId>
-      <version>${jaxrs-api.version}</version>
     </dependency>
 
     <dependency>
index 9a1816b90e88f333417a6c62d335c67b7f04739f..9442ca0c073b0e6026db7b783cd8f85b2dc36585 100644 (file)
@@ -70,7 +70,7 @@ public class DocProvider implements BundleActivator, ServiceTrackerCustomizer<Br
     @Override
     public void start(BundleContext context) throws Exception {
         bundleContext = context;
-        brokerServiceTracker = new ServiceTracker(context, Broker.class, this);
+        brokerServiceTracker = new ServiceTracker<>(context, Broker.class, this);
         brokerServiceTracker.open();
     }
 
index c08f329f0d81d694e8c4f97a04fd2dfe69c25468..192836e9fae825373096ae1f8327d93c2ccdd187 100644 (file)
@@ -39,7 +39,7 @@ public class NotificationServiceImpl implements NotificationService {
         notifications.add(new QName(notificationType.toString()));
         String notificationStreamName = RemoteStreamTools.createNotificationStream(salRemoteService, notifications);
         final Map<String,EventStreamInfo> desiredEventStream = RemoteStreamTools.createEventStream(restconfClientContext, notificationStreamName);
-        RemoteNotificationListener remoteNotificationListener = new RemoteNotificationListener(listener);
+        RemoteNotificationListener<T> remoteNotificationListener = new RemoteNotificationListener<T>(listener);
 
         final ListenerRegistration<?> listenerRegistration = restconfClientContext.getEventStreamContext(desiredEventStream.get(desiredEventStream.get(notificationStreamName)))
                 .registerNotificationListener(remoteNotificationListener);
index 895a5030e965bfdf19c35b459a2c3f5e64acd3ec..82fa2ae2e971338dacb4a09e7cd58e83f701b5ce 100644 (file)
@@ -8,15 +8,16 @@
 package org.opendaylight.controller.sal.restconf.broker.listeners;
 
 import org.opendaylight.controller.sal.binding.api.NotificationListener;
+import org.opendaylight.yangtools.yang.binding.Notification;
 
-public class RemoteNotificationListener implements org.opendaylight.yangtools.yang.binding.NotificationListener {
+public class RemoteNotificationListener<T extends Notification> implements org.opendaylight.yangtools.yang.binding.NotificationListener {
 
-    org.opendaylight.controller.sal.binding.api.NotificationListener listener;
+    NotificationListener<T> listener;
 
-    public RemoteNotificationListener(NotificationListener listener){
+    public RemoteNotificationListener(NotificationListener<T> listener){
         this.listener = listener;
     }
-    public NotificationListener getListener(){
+    public NotificationListener<T> getListener() {
         return this.listener;
     }
 
index 16ca0aee932e66d9669fcd28528c45d267dedf09..3c4bbba4a4e8a273bc1e58095e785eec2dbf17ba 100644 (file)
@@ -11,14 +11,14 @@ import org.opendaylight.controller.sal.binding.api.NotificationListener;
 import org.opendaylight.yangtools.yang.binding.Notification;
 
 
-public class SalNotificationListener implements NotificationListener {
-    private NotificationListener notificationListener;
+public class SalNotificationListener<T extends Notification> implements NotificationListener<T> {
+    private NotificationListener<T> notificationListener;
 
-    public SalNotificationListener( NotificationListener notificationListener){
+    public SalNotificationListener( NotificationListener<T> notificationListener){
         this.notificationListener = notificationListener;
     }
     @Override
     public void onNotification(Notification notification) {
-        this.notificationListener.onNotification(notification);
+        this.notificationListener.onNotification((T)notification);
     }
 }
index 1a443177c68a4ef8fa44ee2db7a461ff184ff8c1..eb6c51b35194e54c2c33ebc220668a99270a134a 100644 (file)
@@ -45,7 +45,6 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
-      <version>${slf4j.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
index 10b643f9f4d5c3a770ae229e688cdbe755ad951e..47fbc6ddcfa9b6179cea3a430bc368fe5ee7b772 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 104bf4df94c86dfe8b5bb44674020feb0f1c5ecb..1e5d2bb8d96e55f6c75f7ae27dafafc50df82105 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 d75feb273eda83999d55dbcafb0aeb16257d97fc..4802cba7af675c5e2a6dd11cc0851d676524d095 100644 (file)
@@ -27,12 +27,12 @@ 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();
-        for (Object character: (List)listOfStrings) {
+        for (Object character: (List<?>)listOfStrings) {
             Util.checkType(character, String.class);
             b.append(character);
         }
index 816e118f3944f4fb29e63a8b8dbd697cdf260d7e..3c4213cbc381b62d70ac073937e89dfaebbdde5e 100644 (file)
@@ -9,13 +9,12 @@
 package org.opendaylight.controller.netconf.confignetconfconnector.operations.runtimerpc;
 
 import static org.junit.Assert.assertEquals;
-
+import com.google.common.collect.ImmutableMap;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -35,9 +34,7 @@ public class RuntimeRpcElementResolvedTest {
         return Arrays.asList(new Object[][] {
                 // With namespaces
                 { "/a:modules/a:module[a:name='instanceName'][a:type='moduleType']/b:listener-state[b:peer-id='127.0.0.1']",
-                        new HashMap<String, String>() {{
-                            put("listener-state", "127.0.0.1");
-                        }}},
+                        new HashMap<>(ImmutableMap.of("listener-state", "127.0.0.1"))},
                 { "/a:modules/a:module[a:name='instanceName'][a:type='moduleType']",
                         null},
 
@@ -57,10 +54,7 @@ public class RuntimeRpcElementResolvedTest {
                 { "/modules/module[name=instanceName and type=moduleType]/inner[key=\"b\"]", Collections.singletonMap("inner", "b")},
 
                 { "/modules/module[name=instanceName and type=\"moduleType\"]/inner[key2=a]/inner2[key=b]",
-                        new HashMap<String, String>() {{
-                            put("inner", "a");
-                            put("inner2", "b");
-                        }}
+                        new HashMap<>(ImmutableMap.of("inner", "a", "inner2", "b"))
                 },
         });
     }
index 95fdcccab80a08f839666a152d89c722158bb949..62d6275b9ef004440db7f6a075b114b476edb2c1 100644 (file)
@@ -17,7 +17,6 @@ import org.junit.Test;
 import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessageAdditionalHeader;
 import org.opendaylight.protocol.framework.SessionListenerFactory;
 import org.opendaylight.protocol.framework.SessionNegotiator;
-
 import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -27,15 +26,15 @@ public class NetconfClientSessionNegotiatorFactoryTest {
     public void testGetSessionNegotiator() throws Exception {
         NetconfClientSessionListener sessionListener = mock(NetconfClientSessionListener.class);
         Timer timer = new HashedWheelTimer();
-        SessionListenerFactory listenerFactory = mock(SessionListenerFactory.class);
+        SessionListenerFactory<NetconfClientSessionListener> listenerFactory = mock(SessionListenerFactory.class);
         doReturn(sessionListener).when(listenerFactory).getSessionListener();
 
         Channel channel = mock(Channel.class);
-        Promise promise = mock(Promise.class);
+        Promise<NetconfClientSession> promise = mock(Promise.class);
         NetconfClientSessionNegotiatorFactory negotiatorFactory = new NetconfClientSessionNegotiatorFactory(timer,
                 Optional.<NetconfHelloMessageAdditionalHeader>absent(), 200L);
 
-        SessionNegotiator sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise);
+        SessionNegotiator<?> sessionNegotiator = negotiatorFactory.getSessionNegotiator(listenerFactory, channel, promise);
         assertNotNull(sessionNegotiator);
     }
 }
index 9993f48a4d2029977c62c35a4e28de7a122ac422..187f13b2585d9fda02fdc6de209e58cc92001ebd 100644 (file)
@@ -103,7 +103,7 @@ public class NetconfClientSessionNegotiatorTest {
         return pipeline;
     }
 
-    private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise promise,
+    private NetconfClientSessionNegotiator createNetconfClientSessionNegotiator(final Promise<NetconfClientSession> promise,
                                                                                 final NetconfMessage startExi) {
         ChannelProgressivePromise progressivePromise = mock(ChannelProgressivePromise.class);
         NetconfClientSessionPreferences preferences = new NetconfClientSessionPreferences(helloMessage, startExi);
@@ -122,7 +122,7 @@ public class NetconfClientSessionNegotiatorTest {
         NetconfClientSessionNegotiator negotiator = createNetconfClientSessionNegotiator(promise, null);
 
         negotiator.channelActive(null);
-        Set caps = Sets.newSet("a", "b");
+        Set<String> caps = Sets.newSet("a", "b");
         NetconfHelloMessage helloServerMessage = NetconfHelloMessage.createServerHello(caps, 10);
         negotiator.handleMessage(helloServerMessage);
         verify(promise).setSuccess(anyObject());
@@ -137,7 +137,7 @@ public class NetconfClientSessionNegotiatorTest {
         NetconfClientSessionNegotiator negotiator = createNetconfClientSessionNegotiator(promise, exiMessage);
 
         negotiator.channelActive(null);
-        Set caps = Sets.newSet("exi:1.0");
+        Set<String> caps = Sets.newSet("exi:1.0");
         NetconfHelloMessage helloMessage = NetconfHelloMessage.createServerHello(caps, 10);
 
         doAnswer(new Answer<Object>() {
index 29b903f235d190eae0c68cc563c4109335fe5a2b..9065ca45a290a4b761dc693caf6b17ca3723182d 100644 (file)
@@ -25,7 +25,7 @@ public class SimpleNetconfClientSessionListenerTest {
 
     private Channel channel;
     private ChannelFuture channelFuture;
-    Set caps;
+    Set<String> caps;
     private NetconfHelloMessage helloMessage;
     private NetconfMessage message;
     private NetconfClientSessionListener sessionListener;
index 1b078be9a44863031bab7c631bf3adda53180b5d..21250357994644a7bafa0940acc880a802c43a0f 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)
@@ -75,17 +73,17 @@ public class NetconfMonitoringServiceImplTest {
     public void testGetSchemas3() throws Exception {
         doReturn("").when(managementSession).toString();
         Capability cap = mock(Capability.class);
-        Set caps = Sets.newHashSet(cap);
-        Set services = Sets.newHashSet(operationService);
+        Set<Capability> caps = Sets.newHashSet(cap);
+        Set<NetconfOperationService> services = Sets.newHashSet(operationService);
         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 a9c1e8336d62419a79f6d320cd0784ecc8dc37cb..f1f7375f0a16901fffa09a810cc052761e979c72 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
-        <version>2.4</version>
         <executions>
           <execution>
             <goals>
index b392c5b6726ea2e3ed3c8fc63f943a9bed75dacc..0a3a77cc6030101078703adefdfc3d0431e652b1 100644 (file)
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.12</version>
         <configuration>
           <failsOnError>false</failsOnError>
           <failOnViolation>false</failOnViolation>
index c590da4dbc1c55fca296a5059061dca4a99c75ef..2fee2720c2197d5af35ec0c839ad44f5df631942 100644 (file)
@@ -294,8 +294,8 @@ import org.slf4j.LoggerFactory;
         if (classes == null || classes.size() == 0) return;
         Map<String,String> names = new HashMap<String,String>();
         StringBuilder conflictsMsg = new StringBuilder();
-        for (Class c : classes) {
-            XmlRootElement root = (XmlRootElement) c.getAnnotation(XmlRootElement.class);
+        for (Class<?> c : classes) {
+            XmlRootElement root = c.getAnnotation(XmlRootElement.class);
             if (root == null) continue;
             String rootName = root.name();
             if ("##default".equals(rootName)) {
index 13431fbd86b7fdb11a6d2b9ac4027812f9ba7f8b..c2efbe67a9a17369e3613bdec8b5cb929fe7498b 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);
         }
 
index bfe2c922bd857ef93686ccd05a5f6e8c0485b6a8..cc45d6de5d76e47b3e595ec149b921de179033d1 100644 (file)
@@ -79,7 +79,7 @@ public class NeutronFirewallPolicyNorthbound {
             @QueryParam("name") String queryFirewallPolicyName,
             @QueryParam("description") String querySecurityPolicyDescription,
             @QueryParam("shared") String querySecurityPolicyIsShared,
-            @QueryParam("firewall_rules") List querySecurityPolicyFirewallRules,
+            @QueryParam("firewall_rules") List<String> querySecurityPolicyFirewallRules,
             @QueryParam("audited") Boolean querySecurityPolicyIsAudited,
             // pagination
             @QueryParam("limit") String limit,
index 7bd15ff7f45c2aa56bfde10a4878ac55371fc533..5a637b79991fa26553e0b902571c2ecd311b7b40 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 0c9ebab8c3c126a2442a0b8ef87ab30577602a10..6f23cc735ac21b26012827176916f0beece54bb6 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;
index e9dc2ad0ee5d74595ffcb639501da8c9d1286c95..c0b61278a667987e269843a9cedea9384bcf88f7 100644 (file)
@@ -195,7 +195,7 @@ public final class ProtocolService<T> {
             return false;
         }
 
-        ProtocolService plugin = (ProtocolService)o;
+        ProtocolService<?> plugin = (ProtocolService<?>)o;
         return (service.equals(plugin.service) && priority == plugin.priority);
     }
 
index 430dfca74db3f50394f156a6dcb27f59bf098c3b..e5616be22275d3b9f73b2e30e2b1d9227cb06b97 100644 (file)
@@ -44,7 +44,6 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <extensions>true</extensions>
         <configuration>
           <instructions>
index 2de8c5c26c6c05cbac6d8400853393107048fb99..4aa3e2791f79f12c2bf8830871b0470c5b814742 100644 (file)
@@ -27,7 +27,6 @@
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>topologymanager</artifactId>
-      <version>${topologymanager.version}</version>
     </dependency>
   </dependencies>
 
@@ -36,7 +35,6 @@
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
         <configuration>
           <instructions>
             <Import-Package>org.apache.felix.service.command,