TestableDataTreeChangeListenerModule.class, JobCoordinatorTestModule.class);
@Inject DataBroker dataBroker;
- SingleTransactionDataBroker db = new SingleTransactionDataBroker(dataBroker);
@Inject OdlInterfaceRpcService odlInterfaceRpcService;
@Inject IInterfaceManager interfaceManager;
@Inject JobCoordinatorCountedEventsWaiter coordinatorEventsWaiter;
@Inject BatchingUtils batchingUtils;
@Inject FlowAssertTestUtils flowAssertTestUtils;
+ SingleTransactionDataBroker db;
+
@Before
public void start() throws InterruptedException, TransactionCommitFailedException {
+ db = new SingleTransactionDataBroker(dataBroker);
+
// Create the bridge and make sure it is ready
setupAndAssertBridgeCreation();
}
*/
package org.opendaylight.genius.datastoreutils;
+import static java.util.Objects.requireNonNull;
import static org.opendaylight.genius.datastoreutils.TransactionCommitFailedExceptionMapper.SUBMIT_MAPPER;
import com.google.common.base.Optional;
+import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
private final DataBroker broker;
// do *NOT* use BP @Inject here, see comment above
- public SingleTransactionDataBroker(DataBroker broker) {
- this.broker = broker;
+ public SingleTransactionDataBroker(@Nonnull DataBroker broker) {
+ this.broker = requireNonNull(broker, "dataBroker");
}
/**