Integrate MRI projects for Neon 55/74855/74
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 6 Aug 2018 13:27:49 +0000 (15:27 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 24 Oct 2018 16:34:41 +0000 (16:34 +0000)
This patch bumps:
- odlparent to 4.0.2
- yangtools to 2.1.2
- mdsal to 3.0.1

It also deals with:
- DOMRpcError.getErrors() changing
- java.util.Optional being used in MD-SAL
- xmlunit upgrade via xmlunit-legacy
- any(Class) not matching nulls
- lists disappearing and hence requiring at least one item
- remove explicit <null/> in blueprints, as that breaks blueprint-core
- adjust sal-binding-it to include byte-buddy, which is a mockito dependency
- adjust dependencies to account for ietf-{inet,yang}-types movement
- moving to tech.pantheon.triemap
- mdsal.common.api removals

JIRA: CONTROLLER-1860
Change-Id: I31b2d011015846537a99f963ded1d38e7b29d71e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
117 files changed:
benchmark/api/pom.xml
benchmark/artifacts/pom.xml
benchmark/dsbenchmark/pom.xml
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaDelete.java
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaRead.java
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaWrite.java
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainDomDelete.java
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainDomRead.java
benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainDomWrite.java
benchmark/ntfbenchmark/pom.xml
benchmark/pom.xml
benchmark/rpcbenchmark/pom.xml
features/benchmark/features-mdsal-benchmark/pom.xml
features/benchmark/odl-benchmark-api/pom.xml
features/benchmark/odl-dsbenchmark/pom.xml
features/benchmark/odl-mdsal-benchmark/pom.xml
features/benchmark/odl-ntfbenchmark/pom.xml
features/benchmark/pom.xml
features/config-netty/features-config-netty/pom.xml
features/config-netty/odl-config-netty/pom.xml
features/config-netty/odl-config-netty/src/main/feature/feature.xml
features/config-netty/pom.xml
features/extras/features-extras/pom.xml
features/extras/odl-extras-all/pom.xml
features/extras/odl-jolokia/pom.xml
features/extras/pom.xml
features/mdsal/features-mdsal/pom.xml
features/mdsal/odl-clustering-test-app/pom.xml
features/mdsal/odl-controller-mdsal-common/pom.xml
features/mdsal/odl-controller-model-topology/pom.xml
features/mdsal/odl-mdsal-all/pom.xml
features/mdsal/odl-mdsal-broker-local/pom.xml
features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml
features/mdsal/odl-mdsal-broker/pom.xml
features/mdsal/odl-mdsal-clustering-commons/pom.xml
features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml
features/mdsal/odl-mdsal-clustering/pom.xml
features/mdsal/odl-mdsal-distributed-datastore/pom.xml
features/mdsal/odl-mdsal-model-inventory/pom.xml
features/mdsal/odl-mdsal-remoterpc-connector/pom.xml
features/mdsal/odl-mdsal-remoterpc-connector/src/main/feature/feature.xml
features/mdsal/odl-message-bus-collector/pom.xml
features/mdsal/odl-toaster/pom.xml
features/mdsal/pom.xml
features/pom.xml
karaf/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml
opendaylight/archetypes/pom.xml
opendaylight/blueprint/pom.xml
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/StaticServiceReferenceRecipe.java
opendaylight/commons/jolokia/pom.xml
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerCloseable.java
opendaylight/config/netty-timer-config/src/main/resources/org/opendaylight/blueprint/netty-timer.xml
opendaylight/config/pom.xml
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ActorBehaviorTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/TransmittingTransmitQueueTest.java
opendaylight/md-sal/mdsal-artifacts/pom.xml
opendaylight/md-sal/mdsal-it-base/pom.xml
opendaylight/md-sal/mdsal-it-parent/pom.xml
opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml
opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml
opendaylight/md-sal/mdsal-trace/features/pom.xml
opendaylight/md-sal/mdsal-trace/pom.xml
opendaylight/md-sal/parent/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorRecoverySupportTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImplTest.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedDataBroker.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/AbstractForwardedTransaction.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMMountPointListenerAdapter.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/RpcServiceAdapter.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMDataTreeChangeServiceAdapterTest.java
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-binding-it/src/main/java/org/opendaylight/controller/test/sal/binding/it/TestHelper.java
opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractIT.java
opendaylight/md-sal/sal-clustering-commons/pom.xml
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStore.java
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreTest.java
opendaylight/md-sal/sal-clustering-config/pom.xml
opendaylight/md-sal/sal-common-util/src/main/java/org/opendaylight/controller/md/sal/common/util/jmx/ThreadExecutorStatsMXBeanImpl.java
opendaylight/md-sal/sal-distributed-datastore/pom.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBrokerTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionChain.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/DOMBrokerTransactionChain.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHistory.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/entityownership/DistributedEntityOwnershipService.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipStatistics.java
opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/ConcurrentDOMDataBrokerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransactionTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTransactionProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortIntegrationTest.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/DistributedDataStoreRemotingIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/AbstractEntityOwnershipTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipServiceTest.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingTransactionChain.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/mount/DOMMountPointServiceImpl.java
opendaylight/md-sal/sal-dom-compat/src/main/java/org/opendaylight/controller/sal/core/compat/LegacyDOMDataBrokerAdapter.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/md/sal/dom/spi/DefaultDOMRpcResult.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/md/sal/dom/spi/ForwardingDOMRpcResult.java
opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RpcErrorsException.java
opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/AbstractRpcTest.java
opendaylight/md-sal/samples/clustering-test-app/model/pom.xml
opendaylight/model/model-inventory/pom.xml
opendaylight/model/model-topology/pom.xml
opendaylight/model/pom.xml
pom.xml

index 01ba331..57a472e 100644 (file)
@@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
index 1ba6812..7c88644 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index fd203dc..d7ba34c 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
index 5455162..14561a5 100644 (file)
@@ -11,14 +11,13 @@ import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
-import org.opendaylight.mdsal.binding.api.BindingTransactionChain;
 import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.Transaction;
+import org.opendaylight.mdsal.binding.api.TransactionChain;
+import org.opendaylight.mdsal.binding.api.TransactionChainListener;
 import org.opendaylight.mdsal.binding.api.WriteTransaction;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
@@ -45,12 +44,8 @@ public class TxchainBaDelete extends DatastoreAbstractWriter implements Transact
 
         // Dump the whole list into the data store in a single transaction
         // with <outerListElem> PUTs on the transaction
-        TxchainBaWrite dd = new TxchainBaWrite(bindingDataBroker,
-                                               StartTestInput.Operation.PUT,
-                                               outerListElem,
-                                               innerListElem,
-                                               outerListElem,
-                                               dataStore);
+        TxchainBaWrite dd = new TxchainBaWrite(bindingDataBroker, StartTestInput.Operation.PUT, outerListElem,
+            innerListElem, outerListElem, dataStore);
         dd.createList();
         dd.executeList();
     }
@@ -58,7 +53,7 @@ public class TxchainBaDelete extends DatastoreAbstractWriter implements Transact
     @Override
     public void executeList() {
         final LogicalDatastoreType dsType = getDataStoreType();
-        final BindingTransactionChain chain = bindingDataBroker.createTransactionChain(this);
+        final TransactionChain chain = bindingDataBroker.createTransactionChain(this);
 
         WriteTransaction tx = chain.newWriteOnlyTransaction();
         int txSubmitted = 0;
@@ -109,14 +104,14 @@ public class TxchainBaDelete extends DatastoreAbstractWriter implements Transact
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-            final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in TxchainBaDelete, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in TxchainBaDelete, transaction {}, cause {}", chain, transaction.getIdentifier(),
+            cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final TransactionChain chain) {
         LOG.debug("TxchainBaDelete closed successfully, chain {}", chain);
     }
 }
index 5ed70d3..4394daa 100644 (file)
@@ -13,10 +13,10 @@ import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
+import org.opendaylight.mdsal.binding.api.Transaction;
+import org.opendaylight.mdsal.binding.api.TransactionChain;
+import org.opendaylight.mdsal.binding.api.TransactionChainListener;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
@@ -44,12 +44,8 @@ public class TxchainBaRead extends DatastoreAbstractWriter implements Transactio
 
         // Dump the whole list into the data store in a single transaction
         // with <outerListElem> PUTs on the transaction
-        TxchainBaWrite dd = new TxchainBaWrite(bindingDataBroker,
-                                               StartTestInput.Operation.PUT,
-                                               outerListElem,
-                                               innerListElem,
-                                               outerListElem,
-                                               dataStore);
+        TxchainBaWrite dd = new TxchainBaWrite(bindingDataBroker, StartTestInput.Operation.PUT, outerListElem,
+            innerListElem, outerListElem, dataStore);
         dd.createList();
         dd.executeList();
     }
@@ -98,15 +94,14 @@ public class TxchainBaRead extends DatastoreAbstractWriter implements Transactio
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-                                         final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in TxchainBaDelete, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in TxchainBaDelete, transaction {}, cause {}", chain, transaction.getIdentifier(),
+            cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final TransactionChain chain) {
         LOG.debug("TxchainBaDelete closed successfully, chain {}", chain);
     }
-
 }
index efedbfc..e10f947 100644 (file)
@@ -13,14 +13,13 @@ import java.util.List;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.BaListBuilder;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
-import org.opendaylight.mdsal.binding.api.BindingTransactionChain;
 import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.Transaction;
+import org.opendaylight.mdsal.binding.api.TransactionChain;
+import org.opendaylight.mdsal.binding.api.TransactionChainListener;
 import org.opendaylight.mdsal.binding.api.WriteTransaction;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.Operation;
@@ -49,7 +48,7 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti
 
     @Override
     public void executeList() {
-        final BindingTransactionChain chain = bindingDataBroker.createTransactionChain(this);
+        final TransactionChain chain = bindingDataBroker.createTransactionChain(this);
         final LogicalDatastoreType dsType = getDataStoreType();
 
         WriteTransaction tx = chain.newWriteOnlyTransaction();
@@ -107,15 +106,14 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-            final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in DatastoreBaAbstractWrite, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in DatastoreBaAbstractWrite, transaction {}, cause {}", chain,
+            transaction.getIdentifier(), cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final TransactionChain chain) {
         LOG.debug("DatastoreBaAbstractWrite closed successfully, chain {}", chain);
     }
-
 }
index 5135a92..733f51d 100644 (file)
@@ -11,14 +11,13 @@ import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.MoreExecutors;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
@@ -29,7 +28,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class TxchainDomDelete extends DatastoreAbstractWriter implements TransactionChainListener {
+public class TxchainDomDelete extends DatastoreAbstractWriter implements DOMTransactionChainListener {
     private static final Logger LOG = LoggerFactory.getLogger(TxchainBaWrite.class);
     private final DOMDataBroker domDataBroker;
 
@@ -46,12 +45,8 @@ public class TxchainDomDelete extends DatastoreAbstractWriter implements Transac
 
         // Dump the whole list into the data store in a single transaction
         // with <outerListElem> PUTs on the transaction
-        TxchainDomWrite dd = new TxchainDomWrite(domDataBroker,
-                                                 StartTestInput.Operation.PUT,
-                                                 outerListElem,
-                                                 innerListElem,
-                                                 outerListElem,
-                                                 dataStore);
+        TxchainDomWrite dd = new TxchainDomWrite(domDataBroker, StartTestInput.Operation.PUT, outerListElem,
+            innerListElem, outerListElem, dataStore);
         dd.createList();
         dd.executeList();
     }
@@ -113,14 +108,14 @@ public class TxchainDomDelete extends DatastoreAbstractWriter implements Transac
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-            final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in TxchainDomDelete, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final DOMTransactionChain chain, final DOMDataTreeTransaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in TxchainDomDelete, transaction {}, cause {}", chain, transaction.getIdentifier(),
+            cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final DOMTransactionChain chain) {
         LOG.debug("TxchainDomDelete closed successfully, chain {}", chain);
     }
 }
index 0017f77..e54a98a 100644 (file)
@@ -11,12 +11,12 @@ import com.google.common.util.concurrent.FluentFuture;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
@@ -28,7 +28,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class TxchainDomRead extends DatastoreAbstractWriter implements TransactionChainListener {
+public class TxchainDomRead extends DatastoreAbstractWriter implements DOMTransactionChainListener {
     private static final Logger LOG = LoggerFactory.getLogger(TxchainDomRead.class);
     private final DOMDataBroker domDataBroker;
 
@@ -45,12 +45,8 @@ public class TxchainDomRead extends DatastoreAbstractWriter implements Transacti
 
         // Dump the whole list into the data store in a single transaction
         // with <outerListElem> PUTs on the transaction
-        TxchainDomWrite dd = new TxchainDomWrite(domDataBroker,
-                                                 StartTestInput.Operation.PUT,
-                                                     outerListElem,
-                                                     innerListElem,
-                                                     outerListElem,
-                                                     dataStore);
+        TxchainDomWrite dd = new TxchainDomWrite(domDataBroker, StartTestInput.Operation.PUT, outerListElem,
+            innerListElem, outerListElem, dataStore);
         dd.createList();
         dd.executeList();
     }
@@ -81,14 +77,14 @@ public class TxchainDomRead extends DatastoreAbstractWriter implements Transacti
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-                                         final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in TxchainDomDelete, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final DOMTransactionChain chain, final DOMDataTreeTransaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in TxchainDomDelete, transaction {}, cause {}", chain, transaction.getIdentifier(),
+            cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final DOMTransactionChain chain) {
         LOG.debug("TxchainDomDelete closed successfully, chain {}", chain);
     }
 }
index 65393fe..2b7820e 100644 (file)
@@ -13,14 +13,13 @@ import java.util.List;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
 import org.opendaylight.dsbenchmark.DomListBuilder;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.TestExec;
@@ -31,7 +30,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class TxchainDomWrite extends DatastoreAbstractWriter implements TransactionChainListener {
+public class TxchainDomWrite extends DatastoreAbstractWriter implements DOMTransactionChainListener {
     private static final Logger LOG = LoggerFactory.getLogger(TxchainDomWrite.class);
     private final DOMDataBroker domDataBroker;
     private List<MapEntryNode> list;
@@ -113,14 +112,14 @@ public class TxchainDomWrite extends DatastoreAbstractWriter implements Transact
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> chain,
-            final AsyncTransaction<?, ?> transaction, final Throwable cause) {
-        LOG.error("Broken chain {} in TxchainDomWrite, transaction {}, cause {}",
-                chain, transaction.getIdentifier(), cause);
+    public void onTransactionChainFailed(final DOMTransactionChain chain, final DOMDataTreeTransaction transaction,
+            final Throwable cause) {
+        LOG.error("Broken chain {} in TxchainDomWrite, transaction {}, cause {}", chain, transaction.getIdentifier(),
+            cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final DOMTransactionChain chain) {
         LOG.debug("Chain {} closed successfully", chain);
     }
 }
index bf73787..18838a0 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
index ed35732..bb40783 100644 (file)
@@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.controller</groupId>
index c51f86d..6a8ed0c 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
index 0a9c34e..dfc4199 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 7283cdc..c105623 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -27,7 +27,7 @@
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>odl-mdsal-binding-base</artifactId>
-            <version>2.6.0-SNAPSHOT</version>
+            <version>3.0.1</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index b39f41e..8adff44 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 4af0472..ce338c0 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 564eb83..204718f 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 3ec4b36..1a3656e 100644 (file)
@@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
     <groupId>org.opendaylight.controller</groupId>
index edb66dc..9a3736c 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index a5a243e..c8a4150 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -44,7 +44,7 @@
         </dependency>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl-guava-23</artifactId>
+            <artifactId>odl-guava</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 856733f..e4048a9 100644 (file)
@@ -8,7 +8,7 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-config-netty">
     <feature name="odl-config-netty">
-        <feature version="[3.1.0,4)">odl-guava-23</feature>
-        <feature version="[3.1.0,4)">odl-netty-4</feature>
+        <feature version="[4,5)">odl-guava</feature>
+        <feature version="[4,5)">odl-netty-4</feature>
     </feature>
 </features>
index 57d343b..7665843 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index d0103d5..024eeb8 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 8721530..b17504b 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index d0b7d5c..3f810b8 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index b0f1b74..18b39c0 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 5cf0036..5bee20f 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 7020437..0c88d13 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -26,7 +26,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <scope>import</scope>
                 <type>pom</type>
             </dependency>
index 3822ea9..fb777e1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -28,7 +28,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 0ad5115..bb2a788 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -27,7 +27,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 9e0387f..83984fc 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index eba3099..6a125d3 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yangtools-artifacts</artifactId>
-                <version>2.0.10</version>
+                <version>2.1.2</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 93066ba..accea8b 100644 (file)
@@ -8,8 +8,8 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-mdsal-${project.version}">
     <feature name="odl-mdsal-broker-local" version="${project.version}">
-        <feature version="[3.1.0,4)">odl-lmax-3</feature>
-        <feature version="[2.0.3,3)">odl-yangtools-codec</feature>
+        <feature version="[4,5)">odl-lmax-3</feature>
+        <feature version="[2.1,3)">odl-yangtools-codec</feature>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     </feature>
 </features>
index ee6e1d2..89f4bdd 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index df99340..7ca4f77 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 1cc1ba7..bb5c552 100644 (file)
@@ -8,8 +8,8 @@
   -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-clustering-commons" version="${project.version}">
-        <feature version="[3.1.0,4)">odl-akka-system-2.5</feature>
-        <feature version="[3.1.0,4)">odl-akka-persistence-2.5</feature>
-        <feature version="[3.1.0,4)">odl-akka-clustering-2.5</feature>
+        <feature version="[4,5)">odl-akka-system-2.5</feature>
+        <feature version="[4,5)">odl-akka-persistence-2.5</feature>
+        <feature version="[4,5)">odl-akka-clustering-2.5</feature>
     </feature>
 </features>
index 2d0f9a1..938c1e1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 8137125..b987c9b 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index d7d1ca0..3f0f3c1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -28,7 +28,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index c16dd48..bbc3bc9 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -38,8 +38,8 @@
         </dependency>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>odl-akka-leveldb-0.7</artifactId>
-            <version>3.1.3</version>
+            <artifactId>odl-akka-leveldb-0.10</artifactId>
+            <version>4.0.2</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index d1990b6..9079aa9 100644 (file)
@@ -8,6 +8,6 @@
   -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-remoterpc-connector" version="${project.version}">
-        <feature version="[3.1.0,4)">odl-akka-leveldb-0.7</feature>
+        <feature version="[4,5)">odl-akka-leveldb-0.10</feature>
     </feature>
 </features>
index 65c9cf4..9aa0264 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -37,7 +37,7 @@
             <dependency>
                 <groupId>org.opendaylight.mdsal</groupId>
                 <artifactId>mdsal-artifacts</artifactId>
-                <version>2.6.0-SNAPSHOT</version>
+                <version>3.0.1</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
index 4cfb3b1..26ed0d2 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
@@ -27,7 +27,7 @@
         <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>odl-mdsal-binding-runtime</artifactId>
-            <version>2.6.0-SNAPSHOT</version>
+            <version>3.0.1</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index ac34b84..ccf7988 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 23110f5..3f7d4c7 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 7b94110..7a3f2cc 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
     <dependency>
       <groupId>org.opendaylight.mdsal</groupId>
       <artifactId>features-mdsal</artifactId>
-      <version>2.6.0-SNAPSHOT</version>
+      <version>3.0.1</version>
       <classifier>features</classifier>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>features-mdsal-model</artifactId>
-      <version>0.14.0-SNAPSHOT</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-
   </dependencies>
 
   <scm>
index 0546dd8..bf5c1a1 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index ae34d2e..930d692 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index cab2f74..c559a50 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
@@ -20,7 +20,7 @@
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -34,7 +34,7 @@
       <dependency>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yangtools-artifacts</artifactId>
-        <version>2.0.10</version>
+        <version>2.1.2</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 873c698..816bd8f 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index e7b0915..de187bb 100644 (file)
@@ -39,6 +39,11 @@ public final class HashedWheelTimerCloseable implements AutoCloseable, Timer {
         return this.timer.stop();
     }
 
+    public static HashedWheelTimerCloseable newInstance(@Nullable final Long duration,
+            @Nullable final Integer ticksPerWheel) {
+        return newInstance(null, duration, ticksPerWheel);
+    }
+
     public static HashedWheelTimerCloseable newInstance(@Nullable final ThreadFactory threadFactory,
             @Nullable final Long duration, @Nullable final Integer ticksPerWheel) {
         TimeUnit unit = TimeUnit.MILLISECONDS;
index 2ecd1cc..b198449 100644 (file)
@@ -13,7 +13,6 @@
 
   <bean id="timer" class="org.opendaylight.controller.config.yang.netty.timer.HashedWheelTimerCloseable"
           factory-method="newInstance">
-    <argument><null/></argument> <!-- ThreadFactory -->
     <argument value="${tick-duration}"/>
     <argument value="${ticks-per-wheel}"/>
   </bean>
index e1d270e..0240933 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
index d299381..2b6be7d 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.cluster.access.client;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.timeout;
 import static org.mockito.Mockito.verify;
@@ -21,6 +21,7 @@ import akka.persistence.SelectedSnapshot;
 import akka.persistence.SnapshotMetadata;
 import akka.testkit.TestProbe;
 import akka.testkit.javadsl.TestKit;
+import com.typesafe.config.ConfigFactory;
 import java.lang.reflect.Field;
 import java.util.Optional;
 import java.util.concurrent.TimeUnit;
@@ -51,7 +52,8 @@ public class ActorBehaviorTest {
     public void setUp() throws Exception {
         initialBehavior = createInitialBehaviorMock();
         system = ActorSystem.apply("system1");
-        final ActorRef storeRef = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null);
+        final ActorRef storeRef = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null,
+            ConfigFactory.empty());
         probe = new TestProbe(system);
         storeRef.tell(probe.ref(), ActorRef.noSender());
         final MemberName name = MemberName.forName("member-1");
index f1bceee..ea39e42 100644 (file)
@@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -250,7 +250,7 @@ public class TransmittingTransmitQueueTest extends AbstractTransmitQueueTest<Tra
     @Test
     public void testSlicingFailureOnTransmit() {
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SliceOptions.class).getOnFailureCallback().accept(new Exception("mock"));
+            invocation.<SliceOptions>getArgument(0).getOnFailureCallback().accept(new Exception("mock"));
             return Boolean.FALSE;
         }).when(mockMessageSlicer).slice(any());
 
index d1d25ff..020bad8 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index a6409e6..4ee1dfb 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
   <modelVersion>4.0.0</modelVersion>
index c58f039..0727146 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 6ebaea7..6c3e82f 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index f5551cf..5de505e 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
index 5486b5f..9feaa6a 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index c57cfa1..0fde982 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 54d03de..33de146 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.14.0-SNAPSHOT</version>
+    <version>3.0.1</version>
     <relativePath/>
   </parent>
 
@@ -59,7 +59,7 @@
           <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
             <artifactId>findbugs</artifactId>
-            <version>3.1.3</version>
+            <version>4.0.2</version>
           </dependency>
         </dependencies>
         <configuration>
index 82bd1d7..2d0d757 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index 8972947..6f532d5 100644 (file)
@@ -10,9 +10,9 @@ package org.opendaylight.controller.cluster.raft;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyObject;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyObject;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.never;
@@ -25,12 +25,10 @@ import akka.persistence.SnapshotOffer;
 import com.google.common.collect.Sets;
 import java.util.Arrays;
 import java.util.Collections;
-import org.hamcrest.Description;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.ArgumentMatcher;
+import org.mockito.ArgumentMatchers;
 import org.mockito.InOrder;
-import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
@@ -93,11 +91,11 @@ public class RaftActorRecoverySupportTest {
         context.setReplicatedLog(ReplicatedLogImpl.newInstance(context));
     }
 
-    private void sendMessageToSupport(Object message) {
+    private void sendMessageToSupport(final Object message) {
         sendMessageToSupport(message, false);
     }
 
-    private void sendMessageToSupport(Object message, boolean expComplete) {
+    private void sendMessageToSupport(final Object message, final boolean expComplete) {
         boolean complete = support.handleRecoveryMessage(message, mockPersistentProvider);
         assertEquals("complete", expComplete, complete);
     }
@@ -300,18 +298,8 @@ public class RaftActorRecoverySupportTest {
     }
 
     static UpdateElectionTerm updateElectionTerm(final long term, final String votedFor) {
-        return Matchers.argThat(new ArgumentMatcher<UpdateElectionTerm>() {
-            @Override
-            public boolean matches(Object argument) {
-                UpdateElectionTerm other = (UpdateElectionTerm) argument;
-                return term == other.getCurrentTerm() && votedFor.equals(other.getVotedFor());
-            }
-
-            @Override
-            public void describeTo(Description description) {
-                description.appendValue(new UpdateElectionTerm(term, votedFor));
-            }
-        });
+        return ArgumentMatchers.argThat(
+            other -> term == other.getCurrentTerm() && votedFor.equals(other.getVotedFor()));
     }
 
     @Test
index ff4d097..6ae5731 100644 (file)
@@ -8,23 +8,21 @@
 package org.opendaylight.controller.cluster.raft;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.same;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.same;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 
 import akka.japi.Procedure;
 import java.util.Collections;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatcher;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.mockito.internal.matchers.Same;
 import org.opendaylight.controller.cluster.DataPersistenceProvider;
@@ -66,12 +64,12 @@ public class ReplicatedLogImplTest {
     }
 
     @SuppressWarnings({ "unchecked", "rawtypes" })
-    private void verifyPersist(Object message, Matcher<?> matcher, boolean async) throws Exception {
+    private void verifyPersist(Object message, ArgumentMatcher<?> matcher, boolean async) throws Exception {
         ArgumentCaptor<Procedure> procedure = ArgumentCaptor.forClass(Procedure.class);
         if (async) {
-            verify(mockPersistence).persistAsync(Matchers.argThat(matcher), procedure.capture());
+            verify(mockPersistence).persistAsync(argThat(matcher), procedure.capture());
         } else {
-            verify(mockPersistence).persist(Matchers.argThat(matcher), procedure.capture());
+            verify(mockPersistence).persist(argThat(matcher), procedure.capture());
         }
 
         procedure.getValue().apply(message);
@@ -93,7 +91,7 @@ public class ReplicatedLogImplTest {
         reset(mockPersistence);
 
         ReplicatedLogEntry logEntry2 = new SimpleReplicatedLogEntry(2, 1, new MockPayload("2"));
-        Procedure<ReplicatedLogEntry> mockCallback = Mockito.mock(Procedure.class);
+        Procedure<ReplicatedLogEntry> mockCallback = mock(Procedure.class);
         log.appendAndPersist(logEntry2, mockCallback, true);
 
         verifyPersist(logEntry2);
@@ -108,7 +106,7 @@ public class ReplicatedLogImplTest {
     public void testAppendAndPersisWithDuplicateEntry() throws Exception {
         ReplicatedLog log = ReplicatedLogImpl.newInstance(context);
 
-        Procedure<ReplicatedLogEntry> mockCallback = Mockito.mock(Procedure.class);
+        Procedure<ReplicatedLogEntry> mockCallback = mock(Procedure.class);
         ReplicatedLogEntry logEntry = new SimpleReplicatedLogEntry(1, 1, new MockPayload("1"));
 
         log.appendAndPersist(logEntry, mockCallback, true);
@@ -196,18 +194,7 @@ public class ReplicatedLogImplTest {
         verifyNoMoreInteractions(mockPersistence);
     }
 
-    public Matcher<DeleteEntries> match(final DeleteEntries actual) {
-        return new BaseMatcher<DeleteEntries>() {
-            @Override
-            public boolean matches(Object obj) {
-                DeleteEntries other = (DeleteEntries) obj;
-                return actual.getFromIndex() == other.getFromIndex();
-            }
-
-            @Override
-            public void describeTo(Description description) {
-                description.appendText("DeleteEntries: fromIndex: " + actual.getFromIndex());
-            }
-        };
+    public ArgumentMatcher<DeleteEntries> match(final DeleteEntries actual) {
+        return other -> actual.getFromIndex() == other.getFromIndex();
     }
 }
index 5bd3fe7..c34c737 100644 (file)
@@ -7,11 +7,11 @@
  */
 package org.opendaylight.controller.md.sal.binding.impl;
 
-import com.google.common.base.Optional;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Optional;
 import java.util.Set;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
@@ -94,7 +94,7 @@ public abstract class AbstractForwardedDataBroker implements Delegator<DOMDataBr
 
     protected Optional<DataObject> toBindingData(final InstanceIdentifier<?> path, final NormalizedNode<?, ?> data) {
         if (path.isWildcarded()) {
-            return Optional.absent();
+            return Optional.empty();
         }
         return (Optional<DataObject>) getCodec().deserializeFunction(path)
                 .apply(Optional.<NormalizedNode<?, ?>>of(data));
index 86c57a3..fe8c758 100644 (file)
@@ -11,6 +11,7 @@ import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
 import org.opendaylight.controller.md.sal.common.api.MappingCheckedFuture;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -62,8 +63,9 @@ abstract class AbstractForwardedTransaction<T extends AsyncTransaction<YangInsta
         Preconditions.checkArgument(!path.isWildcarded(), "Invalid read of wildcarded path %s", path);
 
         return MappingCheckedFuture.create(
-                    Futures.transform(readTx.read(store, codec.toYangInstanceIdentifierBlocking(path)),
-                                      codec.deserializeFunction(path)),
-                    ReadFailedException.MAPPER);
+            Futures.transform(readTx.read(store, codec.toYangInstanceIdentifierBlocking(path)),
+                result -> Optional.fromJavaUtil(codec.deserializeFunction(path).apply(result.toJavaUtil())),
+                MoreExecutors.directExecutor()),
+            ReadFailedException.MAPPER);
     }
 }
index 69e6d99..ef80c78 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.md.sal.binding.impl;
 
-import com.google.common.base.Optional;
+import java.util.Optional;
 import org.opendaylight.controller.md.sal.binding.api.MountPointService.MountPointListener;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMMountPointListener;
index cb47746..a9b1cc5 100644 (file)
@@ -154,7 +154,7 @@ class RpcServiceAdapter implements InvocationHandler {
 
             // DOMRpcResult does not have a notion of success, hence we have to reverse-engineer it by looking
             // at reported errors and checking whether they are just warnings.
-            final Collection<RpcError> errors = input.getErrors();
+            final Collection<? extends RpcError> errors = input.getErrors();
             return RpcResult.class.cast(RpcResultBuilder.status(errors.stream()
                 .noneMatch(error -> error.getSeverity() == ErrorSeverity.ERROR))
                 .withResult(bindingResult).withRpcErrors(errors).build());
index a3d9348..3e68e48 100644 (file)
@@ -8,18 +8,16 @@
 package org.opendaylight.controller.md.sal.binding.impl;
 
 import static org.mockito.AdditionalMatchers.not;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.verify;
 
 import java.util.Collection;
-import org.hamcrest.Description;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Matchers;
+import org.mockito.ArgumentMatchers;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener;
@@ -97,19 +95,8 @@ public class BindingDOMDataTreeChangeServiceAdapterTest {
     }
 
     static DOMDataTreeIdentifier domDataTreeIdentifier(final YangInstanceIdentifier yangID) {
-        return Matchers.argThat(new ArgumentMatcher<DOMDataTreeIdentifier>() {
-            @Override
-            public boolean matches(final Object argument) {
-                final DOMDataTreeIdentifier treeId = (DOMDataTreeIdentifier) argument;
-                return treeId.getDatastoreType() == LogicalDatastoreType.CONFIGURATION
-                        && yangID.equals(treeId.getRootIdentifier());
-            }
-
-            @Override
-            public void describeTo(final Description description) {
-                description.appendValue(new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION, yangID));
-            }
-        });
+        return ArgumentMatchers.argThat(treeId -> treeId.getDatastoreType() == LogicalDatastoreType.CONFIGURATION
+                        && yangID.equals(treeId.getRootIdentifier()));
     }
 
     private static class TestClusteredDataTreeChangeListener implements ClusteredDataTreeChangeListener<Top> {
index c835954..b40e7b7 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
       <dependency>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yangtools-artifacts</artifactId>
-        <version>2.0.10</version>
+        <version>2.1.2</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>mdsal-artifacts</artifactId>
-        <version>2.6.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index fcfd184..c073619 100644 (file)
@@ -12,6 +12,7 @@ import static org.ops4j.pax.exam.CoreOptions.junitBundles;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemPackages;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.options.DefaultCompositeOption;
 import org.ops4j.pax.exam.util.PathUtils;
@@ -37,7 +38,7 @@ public class TestHelper {
                 mavenBundle(YANGTOOLS, "yang-common").versionAsInProject(), // //
                 mavenBundle(YANGTOOLS, "object-cache-api").versionAsInProject(), // //
                 mavenBundle(YANGTOOLS, "object-cache-guava").versionAsInProject(), // //
-                mavenBundle(YANGTOOLS, "triemap").versionAsInProject(), // //
+                mavenBundle("tech.pantheon", "triemap").versionAsInProject(), // //
                 mavenBundle(CONTROLLER, "sal-common-api").versionAsInProject(), // //
                 mavenBundle(CONTROLLER, "sal-common-impl").versionAsInProject(), // //
 
@@ -161,7 +162,7 @@ public class TestHelper {
 
     public static Option baseModelBundles() {
         return new DefaultCompositeOption( //
-                mavenBundle(MDSAL+".model", "yang-ext").versionAsInProject(),
+                mavenBundle(MDSAL + ".model", "yang-ext").versionAsInProject(),
                 mavenBundle(MDSAL_MODELS, "ietf-type-util").versionAsInProject(),
                 mavenBundle(MDSAL_MODELS, "ietf-inet-types").versionAsInProject(),
                 mavenBundle(MDSAL_MODELS, "ietf-yang-types").versionAsInProject(),
@@ -173,8 +174,9 @@ public class TestHelper {
         return new DefaultCompositeOption(
         // Repository required to load harmcrest (OSGi-fied version).
         // Mockito
-                mavenBundle("org.mockito", "mockito-core", "1.10.19"),
-                mavenBundle("org.objenesis", "objenesis", "2.2"),
+                mavenBundle("org.mockito", "mockito-core").versionAsInProject(),
+                mavenBundle("net.bytebuddy", "byte-buddy").versionAsInProject(),
+                mavenBundle("org.objenesis", "objenesis").versionAsInProject(),
                 junitBundles(),
 
                 /*
index 4548114..3ecaf7e 100644 (file)
@@ -31,6 +31,9 @@ public abstract class AbstractIT extends AbstractMdsalTestBase {
 
     @Override
     protected Option[] getAdditionalOptions() {
-        return new Option[]{mavenBundle("org.opendaylight.controller", "sal-test-model").versionAsInProject()};
+        return new Option[] {
+                mavenBundle("org.opendaylight.controller", "sal-test-model").versionAsInProject(),
+                mavenBundle("net.bytebuddy", "byte-buddy").versionAsInProject(),
+        };
     }
 }
index fd62d9e..2b79a38 100644 (file)
@@ -15,9 +15,8 @@
   <dependencies>
     <!-- Java -->
     <dependency>
-      <groupId>xmlunit</groupId>
-      <artifactId>xmlunit</artifactId>
-      <scope>test</scope>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-legacy</artifactId>
     </dependency>
 
     <dependency>
index e1589ff..1ceba1c 100644 (file)
@@ -15,6 +15,7 @@ import akka.persistence.SnapshotSelectionCriteria;
 import akka.persistence.serialization.Snapshot;
 import akka.persistence.serialization.SnapshotSerializer;
 import akka.persistence.snapshot.japi.SnapshotStore;
+import akka.serialization.JavaSerializer;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.io.ByteStreams;
 import com.typesafe.config.Config;
@@ -39,6 +40,7 @@ import java.util.Collections;
 import java.util.Deque;
 import java.util.List;
 import java.util.Optional;
+import java.util.concurrent.Callable;
 import java.util.stream.Collector;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -133,15 +135,17 @@ public class LocalSnapshotStore extends SnapshotStore {
     }
 
     private Object deserialize(final File file) throws IOException {
-        try (ObjectInputStream in = new ObjectInputStream(new FileInputStream(file))) {
-            return in.readObject();
-        } catch (ClassNotFoundException e) {
-            throw new IOException("Error loading snapshot file " + file, e);
-        } catch (IOException e) {
-            LOG.debug("Error loading snapshot file {}", file, e);
-
-            return tryDeserializeAkkaSnapshot(file);
-        }
+        return JavaSerializer.currentSystem().withValue((ExtendedActorSystem) context().system(),
+            (Callable<Object>) () -> {
+                try (ObjectInputStream in = new ObjectInputStream(new FileInputStream(file))) {
+                    return in.readObject();
+                } catch (ClassNotFoundException e) {
+                    throw new IOException("Error loading snapshot file " + file, e);
+                } catch (IOException e) {
+                    LOG.debug("Error loading snapshot file {}", file, e);
+                    return tryDeserializeAkkaSnapshot(file);
+                }
+            });
     }
 
     private Object tryDeserializeAkkaSnapshot(final File file) throws IOException {
index 36a7295..7115dd8 100644 (file)
@@ -63,7 +63,7 @@ public class LocalSnapshotStoreTest {
         createSnapshotDir();
 
         system = ActorSystem.create("test", ConfigFactory.load("LocalSnapshotStoreTest.conf"));
-        snapshotStore = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null);
+        snapshotStore = system.registerExtension(Persistence.lookup()).snapshotStoreFor(null, ConfigFactory.empty());
     }
 
     @AfterClass
index 13661e4..d2041a5 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
 
index c6738c7..47a0cc8 100644 (file)
@@ -76,6 +76,20 @@ public class ThreadExecutorStatsMXBeanImpl extends AbstractMXBean
         return ret;
     }
 
+    /**
+     * Creates a new bean if the backing executor is a ThreadPoolExecutor and registers it.
+     *
+     * @param executor the backing {@link Executor}
+     * @param beanName Used as the <code>name</code> property in the bean's ObjectName.
+     * @param beanType Used as the <code>type</code> property in the bean's ObjectName.
+     * @return a registered ThreadExecutorStatsMXBeanImpl instance if the backing executor
+     *         is a ThreadPoolExecutor, otherwise null.
+     */
+    public static ThreadExecutorStatsMXBeanImpl create(final Executor executor, final String beanName,
+            final String beanType) {
+        return create(executor, beanName, beanType, null);
+    }
+
     /**
      * Creates a new bean if the backing executor is a ThreadPoolExecutor.
      *
index 485e824..70b5055 100644 (file)
   <version>1.9.0-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>tech.pantheon.triemap</groupId>
+        <artifactId>bom</artifactId>
+        <version>1.0.0</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <!-- Java -->
     <dependency>
       <artifactId>yang-data-codec-xml</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
+      <groupId>tech.pantheon.triemap</groupId>
       <artifactId>triemap</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-text</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal</groupId>
+      <artifactId>mdsal-dom-inmemory-datastore</artifactId>
+    </dependency>
 
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
index 9905893..f059676 100644 (file)
@@ -17,7 +17,6 @@ import java.util.EnumMap;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
 import org.opendaylight.mdsal.dom.api.DOMDataBrokerExtension;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
@@ -27,6 +26,7 @@ import org.opendaylight.mdsal.dom.api.DOMDataTreeCommitCohortRegistration;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCommitCohortRegistry;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.mdsal.dom.spi.store.DOMStore;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTreeChangePublisher;
@@ -108,7 +108,7 @@ public abstract class AbstractDOMBroker extends AbstractDOMTransactionFactory<DO
     }
 
     @Override
-    public DOMTransactionChain createTransactionChain(final TransactionChainListener listener) {
+    public DOMTransactionChain createTransactionChain(final DOMTransactionChainListener listener) {
         checkNotClosed();
 
         final Map<LogicalDatastoreType, DOMStoreTransactionChain> backingChains =
index 2053a0f..2655b61 100644 (file)
@@ -5,24 +5,22 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.databroker;
 
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.MoreObjects;
 import com.google.common.base.MoreObjects.ToStringHelper;
-import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.EnumMap;
 import java.util.Map;
-import org.opendaylight.mdsal.common.api.AsyncTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionFactory;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
-public abstract class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction> implements
-        AsyncTransaction<YangInstanceIdentifier, NormalizedNode<?, ?>> {
+public abstract class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction> implements DOMDataTreeTransaction {
 
     private final EnumMap<LogicalDatastoreType, T> backingTxs;
     private final Object identifier;
@@ -35,9 +33,8 @@ public abstract class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction
      */
     protected AbstractDOMBrokerTransaction(final Object identifier,
             Map<LogicalDatastoreType, ? extends DOMStoreTransactionFactory> storeTxFactories) {
-        this.identifier = Preconditions.checkNotNull(identifier, "Identifier should not be null");
-        this.storeTxFactories = Preconditions.checkNotNull(storeTxFactories,
-                "Store Transaction Factories should not be null");
+        this.identifier = requireNonNull(identifier, "Identifier should not be null");
+        this.storeTxFactories = requireNonNull(storeTxFactories, "Store Transaction Factories should not be null");
         this.backingTxs = new EnumMap<>(LogicalDatastoreType.class);
     }
 
@@ -52,14 +49,14 @@ public abstract class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction
      *             if no subtransaction is associated with key.
      */
     protected final T getSubtransaction(final LogicalDatastoreType key) {
-        Preconditions.checkNotNull(key, "key must not be null.");
+        requireNonNull(key, "key must not be null.");
 
         T ret = backingTxs.get(key);
         if (ret == null) {
             ret = createTransaction(key);
             backingTxs.put(key, ret);
         }
-        Preconditions.checkArgument(ret != null, "No subtransaction associated with %s", key);
+        checkArgument(ret != null, "No subtransaction associated with %s", key);
         return ret;
     }
 
index 4168fc9..677610c 100644 (file)
@@ -15,7 +15,6 @@ import org.opendaylight.controller.cluster.databroker.actors.dds.AbstractClientH
 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientLocalHistory;
 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientSnapshot;
 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientTransaction;
-import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
@@ -73,19 +72,11 @@ final class ClientBackedTransactionChain implements DOMStoreTransactionChain {
     }
 
     private ClientSnapshot createSnapshot() {
-        try {
-            return recordSnapshot(history.takeSnapshot());
-        } catch (org.opendaylight.mdsal.common.api.TransactionChainClosedException e) {
-            throw new TransactionChainClosedException("Transaction chain has been closed", e);
-        }
+        return recordSnapshot(history.takeSnapshot());
     }
 
     private ClientTransaction createTransaction() {
-        try {
-            return recordSnapshot(history.createTransaction());
-        } catch (org.opendaylight.mdsal.common.api.TransactionChainClosedException e) {
-            throw new TransactionChainClosedException("Transaction chain has been closed", e);
-        }
+        return recordSnapshot(history.createTransaction());
     }
 
     private Throwable allocationContext() {
index 2a0faee..1f1ea7f 100644 (file)
@@ -19,9 +19,9 @@ import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
 import org.slf4j.Logger;
@@ -43,7 +43,7 @@ final class DOMBrokerTransactionChain extends AbstractDOMTransactionFactory<DOMS
     private static final Logger LOG = LoggerFactory.getLogger(DOMBrokerTransactionChain.class);
     private final AtomicLong txNum = new AtomicLong();
     private final AbstractDOMBroker broker;
-    private final TransactionChainListener listener;
+    private final DOMTransactionChainListener listener;
     private final long chainId;
 
     private volatile State state = State.RUNNING;
@@ -62,7 +62,7 @@ final class DOMBrokerTransactionChain extends AbstractDOMTransactionFactory<DOMS
      *             If any of arguments is null.
      */
     DOMBrokerTransactionChain(final long chainId, final Map<LogicalDatastoreType, DOMStoreTransactionChain> chains,
-            final AbstractDOMBroker broker, final TransactionChainListener listener) {
+            final AbstractDOMBroker broker, final DOMTransactionChainListener listener) {
         super(chains);
         this.chainId = chainId;
         this.broker = Preconditions.checkNotNull(broker);
index 1e8d03a..542cc2d 100644 (file)
@@ -25,7 +25,7 @@ import org.opendaylight.controller.cluster.access.commands.CreateLocalHistoryReq
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.Response;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
-import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainClosedException;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.slf4j.Logger;
@@ -185,7 +185,7 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
 
     private void checkNotClosed() {
         if (state == State.CLOSED) {
-            throw new TransactionChainClosedException(String.format("Local history %s is closed", identifier));
+            throw new DOMTransactionChainClosedException(String.format("Local history %s is closed", identifier));
         }
     }
 
@@ -193,7 +193,7 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
      * Allocate a new {@link ClientTransaction}.
      *
      * @return A new {@link ClientTransaction}
-     * @throws TransactionChainClosedException if this history is closed
+     * @throws DOMTransactionChainClosedException if this history is closed
      * @throws IllegalStateException if a previous dependent transaction has not been closed
      */
     public ClientTransaction createTransaction() {
@@ -210,7 +210,7 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
      * Create a new {@link ClientSnapshot}.
      *
      * @return A new {@link ClientSnapshot}
-     * @throws TransactionChainClosedException if this history is closed
+     * @throws DOMTransactionChainClosedException if this history is closed
      * @throws IllegalStateException if a previous dependent transaction has not been closed
      */
     public ClientSnapshot takeSnapshot() {
index 1e5f58f..dc21545 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifie
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChain;
 import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
-import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainClosedException;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
@@ -114,7 +114,7 @@ final class TransactionChainProxy extends AbstractTransactionContextFactory<Loca
     private static final State CLOSED_STATE = new DefaultState() {
         @Override
         void checkReady() {
-            throw new TransactionChainClosedException("Transaction chain has been closed");
+            throw new DOMTransactionChainClosedException("Transaction chain has been closed");
         }
     };
 
index 1cb7446..95b01fb 100644 (file)
@@ -16,10 +16,10 @@ import akka.dispatch.OnComplete;
 import akka.pattern.Patterns;
 import akka.util.Timeout;
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import java.util.Collection;
+import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.TimeUnit;
@@ -184,13 +184,13 @@ public class DistributedEntityOwnershipService implements DOMEntityOwnershipServ
 
         DataTree dataTree = getLocalEntityOwnershipShardDataTree();
         if (dataTree == null) {
-            return Optional.absent();
+            return Optional.empty();
         }
 
         java.util.Optional<NormalizedNode<?, ?>> entityNode = dataTree.takeSnapshot().readNode(
                 entityPath(forEntity.getType(), forEntity.getIdentifier()));
         if (!entityNode.isPresent()) {
-            return Optional.absent();
+            return Optional.empty();
         }
 
         // Check if there are any candidates, if there are none we do not really have ownership state
@@ -200,7 +200,7 @@ public class DistributedEntityOwnershipService implements DOMEntityOwnershipServ
         final boolean hasCandidates = optionalCandidates.isPresent()
                 && ((MapNode) optionalCandidates.get()).getValue().size() > 0;
         if (!hasCandidates) {
-            return Optional.absent();
+            return Optional.empty();
         }
 
         MemberName localMemberName = context.getCurrentMemberName();
index b7321af..bb00f24 100644 (file)
@@ -33,6 +33,7 @@ import akka.pattern.Patterns;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -543,13 +544,14 @@ class EntityOwnershipShard extends Shard {
     }
 
     private static Collection<String> getCandidateNames(final MapEntryNode entity) {
-        Collection<MapEntryNode> candidates = ((MapNode)entity.getChild(CANDIDATE_NODE_ID).get()).getValue();
-        Collection<String> candidateNames = new ArrayList<>(candidates.size());
-        for (MapEntryNode candidate: candidates) {
-            candidateNames.add(candidate.getChild(CANDIDATE_NAME_NODE_ID).get().getValue().toString());
-        }
-
-        return candidateNames;
+        return entity.getChild(CANDIDATE_NODE_ID).map(child -> {
+            Collection<MapEntryNode> candidates = ((MapNode) child).getValue();
+            Collection<String> candidateNames = new ArrayList<>(candidates.size());
+            for (MapEntryNode candidate: candidates) {
+                candidateNames.add(candidate.getChild(CANDIDATE_NAME_NODE_ID).get().getValue().toString());
+            }
+            return candidateNames;
+        }).orElse(ImmutableList.of());
     }
 
     private void searchForEntitiesOwnedBy(final Set<String> ownedBy, final EntityWalker walker) {
@@ -586,7 +588,8 @@ class EntityOwnershipShard extends Shard {
     }
 
     private static boolean hasCandidate(final MapEntryNode entity, final MemberName candidateName) {
-        return ((MapNode)entity.getChild(CANDIDATE_NODE_ID).get()).getChild(candidateNodeKey(candidateName.getName()))
+        return entity.getChild(CANDIDATE_NODE_ID)
+                .flatMap(child -> ((MapNode)child).getChild(candidateNodeKey(candidateName.getName())))
                 .isPresent();
     }
 
index 8fca4df..442aba0 100644 (file)
@@ -16,11 +16,11 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
 import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.triemap.TrieMap;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
+import tech.pantheon.triemap.TrieMap;
 
 /**
  * EntityOwnershipStatistics is a utility class that keeps track of ownership statistics for the candidates and
index 43d0870..7f0e0f5 100644 (file)
@@ -54,7 +54,6 @@ import org.opendaylight.controller.cluster.datastore.exceptions.NoShardLeaderExc
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.DataStoreUnavailableException;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
 import org.opendaylight.mdsal.dom.api.DOMDataBrokerExtension;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeService;
@@ -65,6 +64,7 @@ import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.mdsal.dom.broker.TransactionCommitFailedExceptionMapper;
 import org.opendaylight.mdsal.dom.spi.store.DOMStore;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
@@ -525,7 +525,7 @@ public class ConcurrentDOMDataBrokerTest {
                 LogicalDatastoreType.OPERATIONAL, domStore, LogicalDatastoreType.CONFIGURATION, domStore),
                 futureExecutor)) {
 
-            dataBroker.createTransactionChain(mock(TransactionChainListener.class));
+            dataBroker.createTransactionChain(mock(DOMTransactionChainListener.class));
 
             verify(domStore, times(2)).createTransactionChain();
         }
@@ -546,7 +546,7 @@ public class ConcurrentDOMDataBrokerTest {
             doReturn(operationalTransaction).when(mockChain).newWriteOnlyTransaction();
 
             DOMTransactionChain transactionChain = dataBroker.createTransactionChain(
-                    mock(TransactionChainListener.class));
+                    mock(DOMTransactionChainListener.class));
 
             DOMDataTreeWriteTransaction domDataWriteTransaction = transactionChain.newWriteOnlyTransaction();
 
index d18d45d..2543ca8 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -64,7 +64,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
     @SuppressWarnings("unchecked")
     private void setupExecuteInActor() {
         doAnswer(inv -> {
-            inv.getArgumentAt(0, InternalCommand.class).execute(mock(ClientActorBehavior.class));
+            inv.<InternalCommand<?>>getArgument(0).execute(mock(ClientActorBehavior.class));
             return null;
         }).when(context).executeInActor(any(InternalCommand.class));
     }
@@ -78,7 +78,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
         setupExecuteInActor();
 
         transaction.handleReplayedRemoteRequest(request, callback, Ticker.systemTicker().read());
-        final ArgumentCaptor<Response> captor = ArgumentCaptor.forClass(Response.class);
+        final ArgumentCaptor<Response<?, ?>> captor = ArgumentCaptor.forClass(Response.class);
         verify(callback).accept(captor.capture());
         final Response<?, ?> value = captor.getValue();
         Assert.assertTrue(value instanceof ReadTransactionSuccess);
@@ -96,7 +96,7 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
         setupExecuteInActor();
 
         transaction.handleReplayedRemoteRequest(request, callback, Ticker.systemTicker().read());
-        final ArgumentCaptor<Response> captor = ArgumentCaptor.forClass(Response.class);
+        final ArgumentCaptor<Response<?, ?>> captor = ArgumentCaptor.forClass(Response.class);
         verify(callback).accept(captor.capture());
         final Response<?, ?> value = captor.getValue();
         Assert.assertTrue(value instanceof ExistsTransactionSuccess);
@@ -168,12 +168,10 @@ public abstract class LocalProxyTransactionTest<T extends LocalProxyTransaction>
      * @return void - always null
      */
     protected static final <T> Answer<T> applyToCursorAnswer(final InvocationOnMock invocation) {
-        final DataTreeModificationCursor cursor =
-                invocation.getArgumentAt(0, DataTreeModificationCursor.class);
+        final DataTreeModificationCursor cursor = invocation.getArgument(0);
         cursor.write(PATH_1.getLastPathArgument(), DATA_1);
         cursor.merge(PATH_2.getLastPathArgument(), DATA_2);
         cursor.delete(PATH_3.getLastPathArgument());
         return null;
     }
-
 }
index 9a7f7a9..ce80810 100644 (file)
@@ -11,7 +11,8 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.nullable;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -206,20 +207,20 @@ public abstract class AbstractShardTest extends AbstractActorTest {
         final DataTree mock = mock(DataTree.class);
 
         doAnswer(invocation -> {
-            actual.validate(invocation.getArgumentAt(0, DataTreeModification.class));
+            actual.validate(invocation.getArgument(0));
             return null;
         }).when(mock).validate(any(DataTreeModification.class));
 
-        doAnswer(invocation -> actual.prepare(invocation.getArgumentAt(0, DataTreeModification.class))).when(
+        doAnswer(invocation -> actual.prepare(invocation.getArgument(0))).when(
                 mock).prepare(any(DataTreeModification.class));
 
         doAnswer(invocation -> {
-            actual.commit(invocation.getArgumentAt(0, DataTreeCandidate.class));
+            actual.commit(invocation.getArgument(0));
             return null;
         }).when(mock).commit(any(DataTreeCandidate.class));
 
         doAnswer(invocation -> {
-            actual.setSchemaContext(invocation.getArgumentAt(0, SchemaContext.class));
+            actual.setSchemaContext(invocation.getArgument(0));
             return null;
         }).when(mock).setSchemaContext(any(SchemaContext.class));
 
@@ -506,14 +507,14 @@ public abstract class AbstractShardTest extends AbstractActorTest {
         private static <T> FutureCallback<T> mockFutureCallback(final FutureCallback<T> actual) {
             FutureCallback<T> mock = mock(FutureCallback.class);
             doAnswer(invocation -> {
-                actual.onFailure(invocation.getArgumentAt(0, Throwable.class));
+                actual.onFailure(invocation.getArgument(0));
                 return null;
             }).when(mock).onFailure(any(Throwable.class));
 
             doAnswer(invocation -> {
-                actual.onSuccess((T) invocation.getArgumentAt(0, Throwable.class));
+                actual.onSuccess(invocation.getArgument(0));
                 return null;
-            }).when(mock).onSuccess((T) any(Object.class));
+            }).when(mock).onSuccess((T) nullable(Object.class));
 
             return mock;
         }
index 4188157..23ed5d6 100644 (file)
@@ -11,10 +11,10 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isA;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -185,6 +185,7 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest {
         doReturn(mockClusterWrapper).when(mockActorContext).getClusterWrapper();
         doReturn(mockClusterWrapper).when(mockActorContext).getClusterWrapper();
         doReturn(dataStoreContextBuilder.build()).when(mockActorContext).getDatastoreContext();
+        doReturn(new Timeout(5, TimeUnit.SECONDS)).when(mockActorContext).getTransactionCommitOperationTimeout();
 
         final ClientIdentifier mockClientId = MockIdentifiers.clientIdentifier(getClass(), memberName);
         mockComponentFactory = new TransactionContextFactory(mockActorContext, mockClientId);
@@ -199,31 +200,26 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest {
 
     protected CreateTransaction eqCreateTransaction(final String expMemberName,
             final TransactionType type) {
-        ArgumentMatcher<CreateTransaction> matcher = new ArgumentMatcher<CreateTransaction>() {
+        class CreateTransactionArgumentMatcher implements ArgumentMatcher<CreateTransaction> {
             @Override
-            public boolean matches(final Object argument) {
-                if (CreateTransaction.class.equals(argument.getClass())) {
-                    CreateTransaction obj = CreateTransaction.fromSerializable(argument);
-                    return obj.getTransactionId().getHistoryId().getClientId().getFrontendId().getMemberName()
-                            .getName().equals(expMemberName) && obj.getTransactionType() == type.ordinal();
-                }
-
-                return false;
+            public boolean matches(CreateTransaction argument) {
+                return argument.getTransactionId().getHistoryId().getClientId().getFrontendId().getMemberName()
+                        .getName().equals(expMemberName) && argument.getTransactionType() == type.ordinal();
             }
-        };
+        }
 
-        return argThat(matcher);
+        return argThat(new CreateTransactionArgumentMatcher());
     }
 
     protected DataExists eqDataExists() {
-        ArgumentMatcher<DataExists> matcher = new ArgumentMatcher<DataExists>() {
+        class DataExistsArgumentMatcher implements ArgumentMatcher<DataExists> {
             @Override
-            public boolean matches(final Object argument) {
-                return argument instanceof DataExists && ((DataExists)argument).getPath().equals(TestModel.TEST_PATH);
+            public boolean matches(DataExists argument) {
+                return argument.getPath().equals(TestModel.TEST_PATH);
             }
-        };
+        }
 
-        return argThat(matcher);
+        return argThat(new DataExistsArgumentMatcher());
     }
 
     protected ReadData eqReadData() {
@@ -231,14 +227,14 @@ public abstract class AbstractTransactionProxyTest extends AbstractTest {
     }
 
     protected ReadData eqReadData(final YangInstanceIdentifier path) {
-        ArgumentMatcher<ReadData> matcher = new ArgumentMatcher<ReadData>() {
+        class ReadDataArgumentMatcher implements ArgumentMatcher<ReadData> {
             @Override
-            public boolean matches(final Object argument) {
-                return argument instanceof ReadData && ((ReadData)argument).getPath().equals(path);
+            public boolean matches(ReadData argument) {
+                return argument.getPath().equals(path);
             }
-        };
+        }
 
-        return argThat(matcher);
+        return argThat(new ReadDataArgumentMatcher());
     }
 
     protected Future<Object> readyTxReply(final String path) {
index ee7fe1f..ce02d6c 100644 (file)
@@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.reset;
@@ -120,7 +120,9 @@ public class DataTreeCohortIntegrationTest {
                     any(SchemaContext.class), any(Collection.class));
 
             kit.testWriteTransaction(dataStore, TestModel.OUTER_LIST_PATH,
-                    ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME).build());
+                    ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                    .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
+                    .build());
             verify(cohort).canCommit(any(Object.class), any(SchemaContext.class), any(Collection.class));
 
             cohortReg.close();
index 45d4bfe..d569f7b 100644 (file)
@@ -12,8 +12,8 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.timeout;
 import static org.mockito.Mockito.verify;
 
@@ -68,11 +68,11 @@ import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelpe
 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.ReadFailedException;
-import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainClosedException;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.mdsal.dom.spi.store.DOMStore;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
@@ -139,6 +139,7 @@ public class DistributedDataStoreIntegrationTest {
 
             testKit.testWriteTransaction(dataStore, TestModel.OUTER_LIST_PATH,
                 ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
                 .build());
         }
     }
@@ -346,6 +347,7 @@ public class DistributedDataStoreIntegrationTest {
 
                     writeTx.merge(TestModel.OUTER_LIST_PATH,
                         ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                        .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
                         .build());
 
                     writeTx.write(listEntryPath,
@@ -772,6 +774,7 @@ public class DistributedDataStoreIntegrationTest {
             // and ready it
             final DOMStoreReadWriteTransaction rwTx = txChain.newReadWriteTransaction();
             final MapNode outerNode = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                    .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
                     .build();
             rwTx.write(TestModel.OUTER_LIST_PATH, outerNode);
 
@@ -883,7 +886,7 @@ public class DistributedDataStoreIntegrationTest {
                 .put(LogicalDatastoreType.CONFIGURATION, dataStore).build(),
                 MoreExecutors.directExecutor());
 
-            final TransactionChainListener listener = Mockito.mock(TransactionChainListener.class);
+            final DOMTransactionChainListener listener = Mockito.mock(DOMTransactionChainListener.class);
             DOMTransactionChain txChain = broker.createTransactionChain(listener);
 
             final List<ListenableFuture<?>> futures = new ArrayList<>();
@@ -970,7 +973,7 @@ public class DistributedDataStoreIntegrationTest {
 
             // Try to create another Tx of each type - should fail b/c
             // the previous Tx was closed.
-            testKit.assertExceptionOnTxChainCreates(txChain, TransactionChainClosedException.class);
+            testKit.assertExceptionOnTxChainCreates(txChain, DOMTransactionChainClosedException.class);
         }
     }
 
@@ -998,6 +1001,7 @@ public class DistributedDataStoreIntegrationTest {
             DOMStoreWriteTransaction writeTx2 = txChain.newWriteOnlyTransaction();
             writeTx2.write(TestModel.OUTER_LIST_PATH,
                 ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
                 .build());
 
             // Ensure the reads succeed.
@@ -1027,7 +1031,7 @@ public class DistributedDataStoreIntegrationTest {
                 .put(LogicalDatastoreType.CONFIGURATION, dataStore).build(),
                 MoreExecutors.directExecutor());
 
-            final TransactionChainListener listener = Mockito.mock(TransactionChainListener.class);
+            final DOMTransactionChainListener listener = Mockito.mock(DOMTransactionChainListener.class);
             final DOMTransactionChain txChain = broker.createTransactionChain(listener);
 
             final DOMDataTreeReadWriteTransaction writeTx = txChain.newReadWriteTransaction();
@@ -1067,7 +1071,7 @@ public class DistributedDataStoreIntegrationTest {
                 .put(LogicalDatastoreType.CONFIGURATION, dataStore).build(),
                 MoreExecutors.directExecutor());
 
-            final TransactionChainListener listener = Mockito.mock(TransactionChainListener.class);
+            final DOMTransactionChainListener listener = Mockito.mock(DOMTransactionChainListener.class);
             final DOMTransactionChain txChain = broker.createTransactionChain(listener);
 
             final DOMDataTreeWriteTransaction writeTx = txChain.newReadWriteTransaction();
@@ -1126,6 +1130,7 @@ public class DistributedDataStoreIntegrationTest {
             // Write 2 updates.
             testKit.testWriteTransaction(dataStore, TestModel.OUTER_LIST_PATH,
                 ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .withChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
                 .build());
 
             YangInstanceIdentifier listPath = YangInstanceIdentifier.builder(TestModel.OUTER_LIST_PATH)
index 0b3cb0b..24371d9 100644 (file)
@@ -12,8 +12,8 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.timeout;
 import static org.mockito.Mockito.verify;
 
@@ -82,9 +82,9 @@ import org.opendaylight.controller.md.cluster.datastore.model.PeopleModel;
 import org.opendaylight.controller.md.cluster.datastore.model.SchemaContextHelper;
 import org.opendaylight.controller.md.cluster.datastore.model.TestModel;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.mdsal.common.api.TransactionChainListener;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.mdsal.dom.spi.store.DOMStore;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
@@ -513,7 +513,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
                         LogicalDatastoreType.CONFIGURATION, followerDistributedDataStore).build(),
                         MoreExecutors.directExecutor());
 
-        final TransactionChainListener listener = Mockito.mock(TransactionChainListener.class);
+        final DOMTransactionChainListener listener = Mockito.mock(DOMTransactionChainListener.class);
         final DOMTransactionChain txChain = broker.createTransactionChain(listener);
 
         final DOMDataTreeWriteTransaction writeTx = txChain.newWriteOnlyTransaction();
@@ -546,7 +546,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
                         LogicalDatastoreType.CONFIGURATION, followerDistributedDataStore).build(),
                         MoreExecutors.directExecutor());
 
-        final TransactionChainListener listener = Mockito.mock(TransactionChainListener.class);
+        final DOMTransactionChainListener listener = Mockito.mock(DOMTransactionChainListener.class);
         final DOMTransactionChain txChain = broker.createTransactionChain(listener);
 
         final DOMDataTreeWriteTransaction writeTx = txChain.newWriteOnlyTransaction();
@@ -812,7 +812,8 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
         cars.add(CarsModel.newCarEntry("car" + carIndex, BigInteger.valueOf(carIndex)));
         writeTx2.write(CarsModel.newCarPath("car" + carIndex), cars.getLast());
         carIndex++;
-        NormalizedNode<?, ?> people = PeopleModel.newPersonMapNode();
+        NormalizedNode<?, ?> people = ImmutableNodes.mapNodeBuilder(PeopleModel.PERSON_QNAME)
+                .withChild(PeopleModel.newPersonEntry("Dude")).build();
         writeTx2.write(PeopleModel.PERSON_LIST_PATH, people);
         final DOMStoreThreePhaseCommitCohort writeTx2Cohort = writeTx2.ready();
 
index cd6e066..93c83a4 100644 (file)
@@ -76,14 +76,14 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
         txContext.executeModification(DELETE, null);
         assertEquals(2, limiter.availablePermits());
 
-        Future<Object> future = txContext.sendBatchedModifications();
+        final Future<Object> sendFuture = txContext.sendBatchedModifications();
         assertEquals(2, limiter.availablePermits());
 
         BatchedModifications msg = kit.expectMsgClass(BatchedModifications.class);
         assertEquals(2, msg.getModifications().size());
         assertEquals(1, msg.getTotalMessagesSent());
         sendReply(new Failure(new NullPointerException()));
-        assertFuture(future, new OnComplete<Object>() {
+        assertFuture(sendFuture, new OnComplete<Object>() {
             @Override
             public void onComplete(final Throwable failure, final Object success) {
                 assertTrue(failure instanceof NullPointerException);
@@ -106,7 +106,7 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
             }
         });
 
-        future = txContext.directCommit(null);
+        final Future<Object> commitFuture = txContext.directCommit(null);
 
         msg = kit.expectMsgClass(BatchedModifications.class);
         // Modification should have been thrown away by the dropped transmit induced by executeRead()
@@ -115,7 +115,7 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
         assertTrue(msg.isReady());
         assertEquals(2, msg.getTotalMessagesSent());
         sendReply(new Failure(new IllegalStateException()));
-        assertFuture(future, new OnComplete<Object>() {
+        assertFuture(commitFuture, new OnComplete<Object>() {
             @Override
             public void onComplete(final Throwable failure, final Object success) {
                 assertTrue(failure instanceof IllegalStateException);
@@ -140,7 +140,7 @@ public class RemoteTransactionContextTest extends AbstractActorTest {
         // Last acquire should have failed ...
         assertEquals(0, limiter.availablePermits());
 
-        Future<Object> future = txContext.sendBatchedModifications();
+        final Future<Object> future = txContext.sendBatchedModifications();
         assertEquals(0, limiter.availablePermits());
 
         BatchedModifications msg = kit.expectMsgClass(BatchedModifications.class);
index 0e1dd44..7de4835 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.controller.cluster.datastore;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.inOrder;
@@ -23,7 +23,6 @@ import org.mockito.InOrder;
 import org.mockito.invocation.InvocationOnMock;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.persisted.CommitTransactionPayload;
-import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 
 public final class ShardDataTreeMocking {
@@ -114,14 +113,13 @@ public final class ShardDataTreeMocking {
         return commitCallback;
     }
 
-    @SuppressWarnings("unchecked")
     private static <T> Object invokeSuccess(final InvocationOnMock invocation, final T value) {
-        invocation.getArgumentAt(0, FutureCallback.class).onSuccess(value);
+        invocation.<FutureCallback<T>>getArgument(0).onSuccess(value);
         return null;
     }
 
     private static Object invokeFailure(final InvocationOnMock invocation) {
-        invocation.getArgumentAt(0, FutureCallback.class).onFailure(mock(Exception.class));
+        invocation.<FutureCallback<?>>getArgument(0).onFailure(mock(Exception.class));
         return null;
     }
 
@@ -183,8 +181,7 @@ public final class ShardDataTreeMocking {
 
     public static void immediatePayloadReplication(final ShardDataTree shardDataTree, final Shard mockShard) {
         doAnswer(invocation -> {
-            shardDataTree.applyReplicatedPayload(invocation.getArgumentAt(0, TransactionIdentifier.class),
-                    invocation.getArgumentAt(1, Payload.class));
+            shardDataTree.applyReplicatedPayload(invocation.getArgument(0), invocation.getArgument(1));
             return null;
         }).when(mockShard).persistPayload(any(TransactionIdentifier.class), any(CommitTransactionPayload.class),
                 anyBoolean());
index a90ec07..a2509fa 100644 (file)
@@ -857,7 +857,9 @@ public class ShardTest extends AbstractShardTest {
 
         final ContainerNode writeData = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
         new WriteModification(TestModel.TEST_PATH, writeData).apply(modification);
-        final MapNode mergeData = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME).build();
+        final MapNode mergeData = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
+                .build();
         new MergeModification(TestModel.OUTER_LIST_PATH, mergeData).apply(modification);
 
         final TransactionIdentifier txId = nextTransactionId();
@@ -888,7 +890,9 @@ public class ShardTest extends AbstractShardTest {
 
         final ContainerNode writeData = ImmutableNodes.containerNode(TestModel.TEST_QNAME);
         new WriteModification(TestModel.TEST_PATH, writeData).apply(modification);
-        final MapNode mergeData = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME).build();
+        final MapNode mergeData = ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME)
+                .addChild(ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, 42))
+                .build();
         new MergeModification(TestModel.OUTER_LIST_PATH, mergeData).apply(modification);
 
         final TransactionIdentifier txId = nextTransactionId();
index 34d36b0..7a4cb9b 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.controller.cluster.datastore;
 
 import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
@@ -70,7 +70,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
 
     private void canCommitSuccess() {
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).successfulCanCommit();
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).successfulCanCommit();
             return null;
         }).when(mockShardDataTree).startCanCommit(cohort);
 
@@ -84,7 +84,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
 
     private void testValidatationPropagates(final Exception cause) {
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).failedCanCommit(cause);
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).failedCanCommit(cause);
             return null;
         }).when(mockShardDataTree).startCanCommit(cohort);
 
@@ -114,7 +114,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
     private DataTreeCandidateTip preCommitSuccess() {
         final DataTreeCandidateTip mockCandidate = mock(DataTreeCandidateTip.class);
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).successfulPreCommit(mockCandidate);
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).successfulPreCommit(mockCandidate);
             return null;
         }).when(mockShardDataTree).startPreCommit(cohort);
 
@@ -136,8 +136,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
         final DataTreeCandidateTip candidate = preCommitSuccess();
 
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).successfulCommit(UnsignedLong.valueOf(0),
-                () -> { });
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).successfulCommit(UnsignedLong.valueOf(0), () -> { });
             return null;
         }).when(mockShardDataTree).startCommit(cohort, candidate);
 
@@ -157,7 +156,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
 
         final Exception cause = new IllegalArgumentException("mock");
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).failedPreCommit(cause);
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).failedPreCommit(cause);
             return null;
         }).when(mockShardDataTree).startPreCommit(cohort);
 
@@ -195,7 +194,7 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest {
 
         final Exception cause = new IllegalArgumentException("mock");
         doAnswer(invocation -> {
-            invocation.getArgumentAt(0, SimpleShardDataTreeCohort.class).failedCommit(cause);
+            invocation.<SimpleShardDataTreeCohort>getArgument(0).failedCommit(cause);
             return null;
         }).when(mockShardDataTree).startCommit(cohort, candidate);
 
index 6b148af..b31c1fc 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.controller.cluster.datastore.entityownership;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.argThat;
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.CANDIDATE_NAME_QNAME;
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.ENTITY_ID_QNAME;
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.ENTITY_OWNERS_PATH;
@@ -30,10 +30,7 @@ import java.util.Optional;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
-import org.hamcrest.Description;
 import org.junit.Assert;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Matchers;
 import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.datastore.AbstractActorTest;
 import org.opendaylight.controller.cluster.datastore.AbstractShardTest;
@@ -41,7 +38,6 @@ import org.opendaylight.controller.cluster.datastore.ShardDataTree;
 import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier;
 import org.opendaylight.controller.cluster.raft.client.messages.GetOnDemandRaftState;
 import org.opendaylight.controller.cluster.raft.client.messages.OnDemandRaftState;
-import org.opendaylight.mdsal.eos.common.api.EntityOwnershipChangeState;
 import org.opendaylight.mdsal.eos.dom.api.DOMEntity;
 import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipChange;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.clustering.entity.owners.rev150804.EntityOwners;
@@ -126,7 +122,13 @@ public class AbstractEntityOwnershipTest extends AbstractActorTest {
             final QName childMap, final QName child, final Object key, final boolean expectPresent) {
         Optional<DataContainerChild<? extends PathArgument, ?>> childNode =
                 parent.getChild(new NodeIdentifier(childMap));
-        assertEquals("Missing " + childMap.toString(), true, childNode.isPresent());
+        // We have to account for empty maps disappearing. If we expect the entry to be non-present, tolerate a missing
+        // map.
+        if (!expectPresent && !childNode.isPresent()) {
+            return null;
+        }
+
+        assertTrue("Missing " + childMap.toString(), childNode.isPresent());
 
         MapNode entityTypeMapNode = (MapNode) childNode.get();
         Optional<MapEntryNode> entityTypeEntry = entityTypeMapNode.getChild(new NodeIdentifierWithPredicates(
@@ -220,37 +222,13 @@ public class AbstractEntityOwnershipTest extends AbstractActorTest {
 
     static DOMEntityOwnershipChange ownershipChange(final DOMEntity expEntity, final boolean expWasOwner,
             final boolean expIsOwner, final boolean expHasOwner, final boolean expInJeopardy) {
-        return Matchers.argThat(new ArgumentMatcher<DOMEntityOwnershipChange>() {
-            @Override
-            public boolean matches(final Object argument) {
-                DOMEntityOwnershipChange change = (DOMEntityOwnershipChange) argument;
-                return expEntity.equals(change.getEntity()) && expWasOwner == change.getState().wasOwner()
-                        && expIsOwner == change.getState().isOwner() && expHasOwner == change.getState().hasOwner()
-                        && expInJeopardy == change.inJeopardy();
-            }
-
-            @Override
-            public void describeTo(final Description description) {
-                description.appendValue(new DOMEntityOwnershipChange(expEntity, EntityOwnershipChangeState.from(
-                        expWasOwner, expIsOwner, expHasOwner), expInJeopardy));
-            }
-        });
+        return argThat(change -> expEntity.equals(change.getEntity()) && expWasOwner == change.getState().wasOwner()
+                && expIsOwner == change.getState().isOwner() && expHasOwner == change.getState().hasOwner()
+                && expInJeopardy == change.inJeopardy());
     }
 
     static DOMEntityOwnershipChange ownershipChange(final DOMEntity expEntity) {
-        return Matchers.argThat(new ArgumentMatcher<DOMEntityOwnershipChange>() {
-            @Override
-            public boolean matches(final Object argument) {
-                DOMEntityOwnershipChange change = (DOMEntityOwnershipChange) argument;
-                return expEntity.equals(change.getEntity());
-            }
-
-            @Override
-            public void describeTo(final Description description) {
-                description.appendValue(new DOMEntityOwnershipChange(expEntity, EntityOwnershipChangeState.from(
-                        false, false, false)));
-            }
-        });
+        return argThat(change -> expEntity.equals(change.getEntity()));
     }
 
     @SuppressWarnings("checkstyle:IllegalCatch")
index 5394a87..9d91c27 100644 (file)
@@ -540,11 +540,10 @@ public class DistributedEntityOwnershipIntegrationTest {
         boolean passed = false;
         for (int i = 0; i < 100; i++) {
             Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
-            final com.google.common.base.Optional<EntityOwnershipState> leaderState =
-                    leaderEntityOwnershipService.getOwnershipState(ENTITY1);
-            final com.google.common.base.Optional<EntityOwnershipState> follower1State =
+            final Optional<EntityOwnershipState> leaderState = leaderEntityOwnershipService.getOwnershipState(ENTITY1);
+            final Optional<EntityOwnershipState> follower1State =
                     follower1EntityOwnershipService.getOwnershipState(ENTITY1);
-            final com.google.common.base.Optional<EntityOwnershipState> follower2State =
+            final Optional<EntityOwnershipState> follower2State =
                     follower2EntityOwnershipService.getOwnershipState(ENTITY1);
             final Optional<DOMEntityOwnershipChange> leaderChange = getValueSafely(leaderChangeCaptor);
             final Optional<DOMEntityOwnershipChange> follower1Change = getValueSafely(follower1ChangeCaptor);
@@ -839,8 +838,8 @@ public class DistributedEntityOwnershipIntegrationTest {
 
     private static void verifyGetOwnershipState(final DOMEntityOwnershipService service, final DOMEntity entity,
             final EntityOwnershipState expState) {
-        com.google.common.base.Optional<EntityOwnershipState> state = service.getOwnershipState(entity);
-        assertEquals("getOwnershipState present", true, state.isPresent());
+        Optional<EntityOwnershipState> state = service.getOwnershipState(entity);
+        assertTrue("getOwnershipState present", state.isPresent());
         assertEquals("EntityOwnershipState", expState, state.get());
     }
 
index 70345f8..56b9f81 100644 (file)
@@ -29,9 +29,9 @@ import static org.opendaylight.controller.cluster.datastore.entityownership.Enti
 import static org.opendaylight.controller.cluster.datastore.entityownership.EntityOwnersModel.entityTypeEntryWithEntityEntry;
 
 import akka.actor.ActorRef;
-import com.google.common.base.Optional;
 import com.google.common.collect.Sets;
 import java.util.Collection;
+import java.util.Optional;
 import java.util.concurrent.TimeUnit;
 import org.junit.After;
 import org.junit.Before;
index 817fcdb..ef77bf1 100644 (file)
@@ -5,10 +5,9 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.md.sal.dom.broker.impl.legacy.sharded.adapter;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
@@ -20,14 +19,13 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
-import org.opendaylight.mdsal.common.api.TransactionChain;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
-
-class ShardedDOMDataBrokerDelegatingTransactionChain implements DOMTransactionChain, org.opendaylight.mdsal.common
-        .api.TransactionChainListener {
+class ShardedDOMDataBrokerDelegatingTransactionChain implements DOMTransactionChain, DOMTransactionChainListener {
     private final org.opendaylight.mdsal.dom.api.DOMTransactionChain txChainDelegate;
     private final SchemaContext schemaContext;
     private final TransactionChainListener txChainListener;
@@ -41,10 +39,10 @@ class ShardedDOMDataBrokerDelegatingTransactionChain implements DOMTransactionCh
                                                           final org.opendaylight.mdsal.dom.api.DOMDataBroker
                                                                   brokerDelegate,
                                                           final TransactionChainListener txChainListener) {
-        checkNotNull(brokerDelegate);
-        this.schemaContext = checkNotNull(schemaContext);
-        this.txChainIdentifier = checkNotNull(txChainIdentifier);
-        this.txChainListener = checkNotNull(txChainListener);
+        requireNonNull(brokerDelegate);
+        this.schemaContext = requireNonNull(schemaContext);
+        this.txChainIdentifier = requireNonNull(txChainIdentifier);
+        this.txChainListener = requireNonNull(txChainListener);
         this.txChainDelegate = brokerDelegate.createTransactionChain(this);
         transactionMap = Maps.newHashMap();
     }
@@ -94,16 +92,13 @@ class ShardedDOMDataBrokerDelegatingTransactionChain implements DOMTransactionCh
     }
 
     @Override
-    public void onTransactionChainFailed(final TransactionChain<?, ?> transactionChain,
-                                         final org.opendaylight.mdsal.common.api.AsyncTransaction<?, ?>
-                                                 asyncTransaction,
-                                         final Throwable throwable) {
-        txChainListener
-                .onTransactionChainFailed(this, transactionFromDelegate(asyncTransaction.getIdentifier()), throwable);
+    public void onTransactionChainFailed(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain,
+            DOMDataTreeTransaction transaction, Throwable cause) {
+        txChainListener.onTransactionChainFailed(this, transactionFromDelegate(transaction.getIdentifier()), cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(final TransactionChain<?, ?> transactionChain) {
+    public void onTransactionChainSuccessful(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain) {
         txChainListener.onTransactionChainSuccessful(this);
     }
 
index 90d513a..f973c43 100644 (file)
@@ -38,8 +38,7 @@ public class DOMMountPointServiceImpl implements DOMMountPointService {
 
     @Override
     public Optional<DOMMountPoint> getMountPoint(final YangInstanceIdentifier path) {
-        final Optional<org.opendaylight.mdsal.dom.api.DOMMountPoint> delegateMountPoint = delegate.getMountPoint(path);
-        return delegateMountPoint.isPresent() ? Optional.of(convert(delegateMountPoint.get())) : Optional.absent();
+        return Optional.fromJavaUtil(delegate.getMountPoint(path).map(DOMMountPointServiceImpl::convert));
     }
 
     private static DOMMountPoint convert(final org.opendaylight.mdsal.dom.api.DOMMountPoint from) {
@@ -51,7 +50,7 @@ public class DOMMountPointServiceImpl implements DOMMountPointService {
 
             @Override
             public <T extends DOMService> Optional<T> getService(final Class<T> cls) {
-                return from.getService(cls);
+                return Optional.fromJavaUtil(from.getService(cls));
             }
 
             @Override
index 2367244..d0f42b7 100644 (file)
@@ -45,7 +45,10 @@ import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeReadWriteTransaction;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainClosedException;
+import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.util.concurrent.ExceptionMapper;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -60,7 +63,7 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
     private static final ExceptionMapper<TransactionCommitFailedException> COMMIT_EX_MAPPER =
             new ExceptionMapper<TransactionCommitFailedException>("commit", TransactionCommitFailedException.class) {
         @Override
-        protected TransactionCommitFailedException newWithCause(String message, Throwable cause) {
+        protected TransactionCommitFailedException newWithCause(final String message, final Throwable cause) {
             if (cause instanceof org.opendaylight.mdsal.common.api.OptimisticLockFailedException) {
                 return new OptimisticLockFailedException(cause.getMessage(), cause.getCause());
             } else if (cause instanceof org.opendaylight.mdsal.common.api.TransactionCommitFailedException) {
@@ -79,7 +82,7 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
     private final org.opendaylight.mdsal.dom.api.DOMDataBroker delegate;
     private final ClassToInstanceMap<DOMDataBrokerExtension> extensions;
 
-    public LegacyDOMDataBrokerAdapter(org.opendaylight.mdsal.dom.api.DOMDataBroker delegate) {
+    public LegacyDOMDataBrokerAdapter(final org.opendaylight.mdsal.dom.api.DOMDataBroker delegate) {
         this.delegate = delegate;
 
         ClassToInstanceMap<org.opendaylight.mdsal.dom.api.DOMDataBrokerExtension> delegateExtensions =
@@ -93,7 +96,7 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
             extBuilder.put(DOMDataTreeChangeService.class, new DOMDataTreeChangeService() {
                 @Override
                 public <L extends DOMDataTreeChangeListener> ListenerRegistration<L> registerDataTreeChangeListener(
-                        DOMDataTreeIdentifier treeId, final L listener) {
+                        final DOMDataTreeIdentifier treeId, final L listener) {
                     final org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener delegateListener;
                     if (listener instanceof ClusteredDOMDataTreeChangeListener) {
                         delegateListener = (org.opendaylight.mdsal.dom.api.ClusteredDOMDataTreeChangeListener)
@@ -160,19 +163,19 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
     @Override
     public DOMTransactionChain createTransactionChain(final TransactionChainListener listener) {
         AtomicReference<DOMTransactionChain> legacyChain = new AtomicReference<>();
-        org.opendaylight.mdsal.common.api.TransactionChainListener delegateListener =
-                new org.opendaylight.mdsal.common.api.TransactionChainListener() {
-            @SuppressWarnings("rawtypes")
+        DOMTransactionChainListener delegateListener =
+                new DOMTransactionChainListener() {
             @Override
-            public void onTransactionChainFailed(final org.opendaylight.mdsal.common.api.TransactionChain<?, ?> chain,
-                    final org.opendaylight.mdsal.common.api.AsyncTransaction<?, ?> transaction, final Throwable cause) {
+            @SuppressWarnings("rawtypes")
+            public void onTransactionChainFailed(final org.opendaylight.mdsal.dom.api.DOMTransactionChain chain,
+                    final DOMDataTreeTransaction transaction, final Throwable cause) {
                 listener.onTransactionChainFailed(legacyChain.get(),
-                        (AsyncTransaction) () -> transaction.getIdentifier(),
-                            cause instanceof Exception ? COMMIT_EX_MAPPER.apply((Exception)cause) : cause);
+                    (AsyncTransaction) () -> transaction.getIdentifier(),
+                        cause instanceof Exception ? COMMIT_EX_MAPPER.apply((Exception)cause) : cause);
             }
 
             @Override
-            public void onTransactionChainSuccessful(org.opendaylight.mdsal.common.api.TransactionChain<?, ?> chain) {
+            public void onTransactionChainSuccessful(final org.opendaylight.mdsal.dom.api.DOMTransactionChain chain) {
                 listener.onTransactionChainSuccessful(legacyChain.get());
             }
         };
@@ -207,7 +210,7 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
     static <T> T wrapException(final Supplier<T> supplier) {
         try {
             return supplier.get();
-        } catch (org.opendaylight.mdsal.common.api.TransactionChainClosedException e) {
+        } catch (DOMTransactionChainClosedException e) {
             throw new TransactionChainClosedException("Transaction chain already closed", e);
         }
     }
@@ -217,19 +220,19 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
         private final DOMDataTreeWriteTransaction writeDelegate;
         private final Object identifier;
 
-        DOMDataTransactionAdapter(@Nonnull DOMDataTreeReadTransaction readDelegate) {
+        DOMDataTransactionAdapter(@Nonnull final DOMDataTreeReadTransaction readDelegate) {
             this.readDelegate = Preconditions.checkNotNull(readDelegate);
             this.identifier = readDelegate.getIdentifier();
             this.writeDelegate = null;
         }
 
-        DOMDataTransactionAdapter(@Nonnull DOMDataTreeWriteTransaction writeDelegate) {
+        DOMDataTransactionAdapter(@Nonnull final DOMDataTreeWriteTransaction writeDelegate) {
             this.writeDelegate = Preconditions.checkNotNull(writeDelegate);
             this.identifier = writeDelegate.getIdentifier();
             this.readDelegate = null;
         }
 
-        DOMDataTransactionAdapter(@Nonnull DOMDataTreeReadWriteTransaction rwDelegate) {
+        DOMDataTransactionAdapter(@Nonnull final DOMDataTreeReadWriteTransaction rwDelegate) {
             this.readDelegate = Preconditions.checkNotNull(rwDelegate);
             this.writeDelegate = rwDelegate;
             this.identifier = readDelegate.getIdentifier();
@@ -287,12 +290,12 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
             final SettableFuture<CommitInfo> resultFuture = SettableFuture.create();
             writeDelegate().commit().addCallback(new FutureCallback<CommitInfo>() {
                 @Override
-                public void onSuccess(CommitInfo result) {
+                public void onSuccess(final CommitInfo result) {
                     resultFuture.set(result);
                 }
 
                 @Override
-                public void onFailure(Throwable ex) {
+                public void onFailure(final Throwable ex) {
                     if (ex instanceof Exception) {
                         resultFuture.setException(COMMIT_EX_MAPPER.apply((Exception)ex));
                     } else {
@@ -308,19 +311,19 @@ public class LegacyDOMDataBrokerAdapter extends ForwardingObject implements DOMD
     private static class DOMDataReadOnlyTransactionAdapter implements DOMDataReadOnlyTransaction {
         private final DOMDataTransactionAdapter adapter;
 
-        DOMDataReadOnlyTransactionAdapter(DOMDataTreeReadTransaction delegateTx) {
+        DOMDataReadOnlyTransactionAdapter(final DOMDataTreeReadTransaction delegateTx) {
             adapter = new DOMDataTransactionAdapter(delegateTx);
         }
 
         @Override
-        public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(LogicalDatastoreType store,
-                YangInstanceIdentifier path) {
+        public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(final LogicalDatastoreType store,
+                final YangInstanceIdentifier path) {
             return adapter.read(store, path);
         }
 
         @Override
-        public CheckedFuture<Boolean, ReadFailedException> exists(LogicalDatastoreType store,
-                YangInstanceIdentifier path) {
+        public CheckedFuture<Boolean, ReadFailedException> exists(final LogicalDatastoreType store,
+                final YangInstanceIdentifier path) {
             return adapter.exists(store, path);
         }
 
index 94cc510..d25df49 100644 (file)
@@ -32,7 +32,7 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
     // interface isn't. In lieu of changing the interface, we assume the implementation is Serializable which is
     // reasonable since the only implementation that is actually used is from the RpcResultBuilder.
     @SuppressFBWarnings("SE_BAD_FIELD")
-    private final Collection<RpcError> errors;
+    private final Collection<? extends RpcError> errors;
 
     // Unfortunately the NormalizedNode interface isn't Serializable but we assume the implementations are.
     @SuppressFBWarnings("SE_BAD_FIELD")
@@ -58,7 +58,8 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
         this(result, Collections.<RpcError>emptyList());
     }
 
-    public DefaultDOMRpcResult(final NormalizedNode<?, ?> result, final @Nonnull Collection<RpcError> errors) {
+    public DefaultDOMRpcResult(final NormalizedNode<?, ?> result,
+            final @Nonnull Collection<? extends RpcError> errors) {
         this.result = result;
         this.errors = Preconditions.checkNotNull(errors);
     }
@@ -68,7 +69,7 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
     }
 
     @Override
-    public @Nonnull Collection<RpcError> getErrors() {
+    public @Nonnull Collection<? extends RpcError> getErrors() {
         return errors;
     }
 
index ba46d3f..e322b01 100644 (file)
@@ -23,7 +23,7 @@ public abstract class ForwardingDOMRpcResult extends ForwardingObject implements
     protected abstract @Nonnull DOMRpcResult delegate();
 
     @Override
-    public Collection<RpcError> getErrors() {
+    public Collection<? extends RpcError> getErrors() {
         return delegate().getErrors();
     }
 
index c8fbe7c..01e5da8 100644 (file)
@@ -52,7 +52,7 @@ public class RpcErrorsException extends DOMRpcException {
 
     private final List<RpcErrorData> rpcErrorDataList = new ArrayList<>();
 
-    public RpcErrorsException(final String message, final Iterable<RpcError> rpcErrors) {
+    public RpcErrorsException(final String message, final Iterable<? extends RpcError> rpcErrors) {
         super(message);
 
         for (final RpcError rpcError: rpcErrors) {
index e512938..0736fae 100644 (file)
@@ -145,7 +145,7 @@ public class AbstractRpcTest {
             final ErrorType errorType, final String tag, final String message, final String applicationTag,
             final String info, final String causeMsg) {
         assertNotNull("RpcResult was null", rpcResult);
-        final Collection<RpcError> rpcErrors = rpcResult.getErrors();
+        final Collection<? extends RpcError> rpcErrors = rpcResult.getErrors();
         assertEquals("RpcErrors count", 1, rpcErrors.size());
         assertRpcErrorEquals(rpcErrors.iterator().next(), severity, errorType, tag, message,
                 applicationTag, info, causeMsg);
index b7e028f..0253f84 100644 (file)
     </build>
     <dependencies>
         <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-inet-types-2013-07-15</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-yang-types-20130715</artifactId>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc6991</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
index 8670b7e..ec5066d 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.14.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <relativePath/>
     </parent>
 
@@ -24,8 +24,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.opendaylight.mdsal.model</groupId>
-            <artifactId>ietf-inet-types-2013-07-15</artifactId>
+            <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+            <artifactId>rfc6991-ietf-inet-types</artifactId>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.model</groupId>
index eb27cfe..2c3e2ac 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.mdsal</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>0.14.0-SNAPSHOT</version>
+        <version>3.0.1</version>
         <relativePath/>
     </parent>
 
index 488d807..d2634df 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>3.1.3</version>
+        <version>4.0.2</version>
         <relativePath/>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index a164f39..665e52e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>3.1.3</version>
+    <version>4.0.2</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.controller</groupId>

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