From: Arunprakash D Date: Wed, 13 Nov 2019 05:34:32 +0000 (+0000) Subject: Merge "Use String(byte[], Charset)" X-Git-Tag: release/magnesium~34 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=a425274a36f7ea227ba3ec7181ee646b5fa50d40;hp=7407fb56fee1e01adc5f50b81d6de9532a5a13f1;p=openflowplugin.git Merge "Use String(byte[], Charset)" --- diff --git a/applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java b/applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java index ce99ea2f89..246f31abb9 100644 --- a/applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java +++ b/applications/arbitratorreconciliation/impl/src/main/java/org/opendaylight/openflowplugin/applications/arbitratorreconciliation/impl/ArbitratorReconciliationManagerImpl.java @@ -12,8 +12,8 @@ import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.JdkFutureAdapters; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; @@ -23,7 +23,6 @@ import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicLong; import javax.annotation.PostConstruct; @@ -40,11 +39,9 @@ import org.opendaylight.openflowplugin.applications.reconciliation.Reconciliatio import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationNotificationListener; import org.opendaylight.serviceutils.upgrade.UpgradeState; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; -import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes; -import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef; @@ -62,7 +59,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.on import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.MessagesBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.Message; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.MessageBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleRemoveFlowCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleRemoveFlowCaseBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleRemoveGroupCase; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleRemoveGroupCaseBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.bundle.remove.flow._case.RemoveFlowCaseDataBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.bundle.remove.group._case.RemoveGroupCaseDataBuilder; @@ -77,6 +76,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.arbitrator.reconcile.service.rev180227.GetActiveBundleOutput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.arbitrator.reconcile.service.rev180227.GetActiveBundleOutputBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.rf.state.rev170713.ResultState; +import org.opendaylight.yangtools.util.concurrent.FluentFutures; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.opendaylight.yangtools.yang.common.RpcError; @@ -99,12 +99,24 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS private static final String SERVICE_NAME = "ArbitratorReconciliationManager"; private static final String SEPARATOR = ":"; + private static final BundleRemoveFlowCase DELETE_ALL_FLOW = new BundleRemoveFlowCaseBuilder() + .setRemoveFlowCaseData( + new RemoveFlowCaseDataBuilder(new FlowBuilder().setTableId(OFConstants.OFPTT_ALL).build()).build()) + .build(); + private static final BundleRemoveGroupCase DELETE_ALL_GROUP = new BundleRemoveGroupCaseBuilder() + .setRemoveGroupCaseData(new RemoveGroupCaseDataBuilder(new GroupBuilder() + .setGroupType(GroupTypes.GroupAll) + .setGroupId(new GroupId(OFConstants.OFPG_ALL)) + .build()).build()) + .build(); + private final SalBundleService salBundleService; private final ReconciliationManager reconciliationManager; private final RoutedRpcRegistration routedRpcReg; private final UpgradeState upgradeState; private NotificationRegistration registration; - private final ExecutorService executor = Executors.newFixedThreadPool(THREAD_POOL_SIZE); + private final ListeningExecutorService executor = MoreExecutors.listeningDecorator( + Executors.newFixedThreadPool(THREAD_POOL_SIZE)); private final Map bundleIdMap = new ConcurrentHashMap<>(); @Inject @@ -193,7 +205,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS return reconcileConfiguration(node); } LOG.trace("arbitrator reconciliation is disabled"); - return Futures.immediateFuture(true); + return FluentFutures.immediateTrueFluentFuture(); } @Override @@ -202,7 +214,7 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS LOG.trace("Stopping arbitrator reconciliation for node {}", datapathId); bundleIdMap.remove(datapathId); deregisterRpc(node); - return Futures.immediateFuture(true); + return FluentFutures.immediateTrueFluentFuture(); } @Override @@ -223,39 +235,19 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS private ListenableFuture reconcileConfiguration(DeviceInfo node) { LOG.info("Triggering arbitrator reconciliation for device {}", node.getDatapathId()); ArbitratorReconciliationTask upgradeReconTask = new ArbitratorReconciliationTask(node); - return JdkFutureAdapters.listenInPoolThread(executor.submit(upgradeReconTask)); + return executor.submit(upgradeReconTask); } @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "https://github.com/spotbugs/spotbugs/issues/811") private Messages createMessages(final NodeRef nodeRef) { final List messages = new ArrayList<>(); - messages.add(new MessageBuilder().setNode(nodeRef).setBundleInnerMessage( - new BundleRemoveFlowCaseBuilder() - .setRemoveFlowCaseData(new RemoveFlowCaseDataBuilder(getDeleteAllFlow()).build()) - .build()).build()); - - messages.add(new MessageBuilder().setNode(nodeRef).setBundleInnerMessage( - new BundleRemoveGroupCaseBuilder() - .setRemoveGroupCaseData(new RemoveGroupCaseDataBuilder(getDeleteAllGroup()).build()) - .build()).build()); + messages.add(new MessageBuilder().setNode(nodeRef).setBundleInnerMessage(DELETE_ALL_FLOW).build()); + messages.add(new MessageBuilder().setNode(nodeRef).setBundleInnerMessage(DELETE_ALL_GROUP).build()); LOG.debug("The size of the flows and group messages created in createMessage() {}", messages.size()); return new MessagesBuilder().setMessage(messages).build(); } - private Flow getDeleteAllFlow() { - final FlowBuilder flowBuilder = new FlowBuilder(); - flowBuilder.setTableId(OFConstants.OFPTT_ALL); - return flowBuilder.build(); - } - - private Group getDeleteAllGroup() { - final GroupBuilder groupBuilder = new GroupBuilder(); - groupBuilder.setGroupType(GroupTypes.GroupAll); - groupBuilder.setGroupId(new GroupId(OFConstants.OFPG_ALL)); - return groupBuilder.build(); - } - private class ArbitratorReconciliationTask implements Callable { final DeviceInfo deviceInfo; @@ -297,13 +289,13 @@ public class ArbitratorReconciliationManagerImpl implements ArbitratorReconcileS return salBundleService .addBundleMessages(addBundleMessagesInput); } - return Futures.immediateFuture(null); + return FluentFutures.immediateNullFluentFuture(); }, MoreExecutors.directExecutor()); Uint64 nodeId = getDpnIdFromNodeName(node); try { if (addBundleMessagesFuture.get().isSuccessful()) { bundleIdMap.put(nodeId, new BundleDetails(bundleIdValue, - Futures.immediateFuture(null))); + FluentFutures.immediateNullFluentFuture())); LOG.debug("Arbitrator reconciliation initial task has been completed for node {} and open up" + " for application programming.", nodeId); return true; diff --git a/applications/arbitratorreconciliation/pom.xml b/applications/arbitratorreconciliation/pom.xml index 178f6c9bbc..af74c3d15a 100644 --- a/applications/arbitratorreconciliation/pom.xml +++ b/applications/arbitratorreconciliation/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpc.java b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpc.java index 7ad33aba25..02bc9bd88c 100644 --- a/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpc.java +++ b/applications/bulk-o-matic/src/main/java/org/opendaylight/openflowplugin/applications/bulk/o/matic/FlowWriterDirectOFRpc.java @@ -132,7 +132,7 @@ public class FlowWriterDirectOFRpc { AddFlowInput addFlowInput = builder.build(); - LOG.debug("RPC invocation for adding flow-id {} with input {}", flowId, addFlowInput.toString()); + LOG.debug("RPC invocation for adding flow-id {} with input {}", flowId, addFlowInput); LoggingFutures.addErrorLogging(flowService.addFlow(addFlowInput), LOG, "addFlow"); if (i % batchSize == 0) { diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java index b64fe2b794..9ce70732f0 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java @@ -275,7 +275,7 @@ public class FlowForwarder extends AbstractListeningCommiter { @Override public void createStaleMarkEntity(InstanceIdentifier identifier, Flow del, InstanceIdentifier nodeIdent) { - LOG.debug("Creating Stale-Mark entry for the switch {} for flow {} ", nodeIdent.toString(), del.toString()); + LOG.debug("Creating Stale-Mark entry for the switch {} for flow {} ", nodeIdent, del); StaleFlow staleFlow = makeStaleFlow(identifier, del, nodeIdent); persistStaleFlow(staleFlow, nodeIdent); } @@ -404,7 +404,7 @@ public class FlowForwarder extends AbstractListeningCommiter { getFlowId(addFlowInput.getFlowRef()), nodeId); } else { LOG.error("Flow add with id {} failed for node {} with error {}", getFlowId(addFlowInput.getFlowRef()), - nodeId, rpcResult.getErrors().toString()); + nodeId, rpcResult.getErrors()); resultFuture.set(RpcResultBuilder.failed() .withRpcErrors(rpcResult.getErrors()).build()); } @@ -454,7 +454,7 @@ public class FlowForwarder extends AbstractListeningCommiter { getFlowId(updateFlowInput.getFlowRef()), nodeId); } else { LOG.error("Flow update with id {} failed for node {} with error {}", - getFlowId(updateFlowInput.getFlowRef()), nodeId, rpcResult.getErrors().toString()); + getFlowId(updateFlowInput.getFlowRef()), nodeId, rpcResult.getErrors()); resultFuture.set(RpcResultBuilder.failed() .withRpcErrors(rpcResult.getErrors()).build()); } diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FrmReconciliationServiceImpl.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FrmReconciliationServiceImpl.java index c721b8500a..f25a34c2d5 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FrmReconciliationServiceImpl.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FrmReconciliationServiceImpl.java @@ -55,7 +55,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService { @Override public ListenableFuture> reconcileNode(ReconcileNodeInput input) { - LOG.debug("Triggering reconciliation for node: {}", input.getNodeId().toString()); + LOG.debug("Triggering reconciliation for node: {}", input.getNodeId()); Node nodeDpn = buildNode(input.getNodeId().longValue()); InstanceIdentifier connectedNode = InstanceIdentifier.builder(Nodes.class) .child(Node.class, nodeDpn.key()).augmentation(FlowCapableNode.class).build(); @@ -64,7 +64,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService { .getNodeListener().reconcileConfiguration(connectedNode); Futures.addCallback(futureResult, new ResultCallBack(futureResult, rpcResult), MoreExecutors.directExecutor()); - LOG.debug("Completing reconciliation for node: {}", input.getNodeId().toString()); + LOG.debug("Completing reconciliation for node: {}", input.getNodeId()); return rpcResult; } diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java index 0d5848d80c..a2522361f6 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java @@ -200,7 +200,7 @@ public class GroupForwarder extends AbstractListeningCommiter { @Override public void createStaleMarkEntity(InstanceIdentifier identifier, Group del, InstanceIdentifier nodeIdent) { - LOG.debug("Creating Stale-Mark entry for the switch {} for Group {} ", nodeIdent.toString(), del.toString()); + LOG.debug("Creating Stale-Mark entry for the switch {} for Group {} ", nodeIdent, del); StaleGroup staleGroup = makeStaleGroup(identifier, del, nodeIdent); persistStaleGroup(staleGroup, nodeIdent); diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java index c65abc8d59..ef8d5d7d97 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java @@ -149,7 +149,7 @@ public class MeterForwarder extends AbstractListeningCommiter { @Override public void createStaleMarkEntity(InstanceIdentifier identifier, Meter del, InstanceIdentifier nodeIdent) { - LOG.debug("Creating Stale-Mark entry for the switch {} for meter {} ", nodeIdent.toString(), del.toString()); + LOG.debug("Creating Stale-Mark entry for the switch {} for meter {} ", nodeIdent, del); StaleMeter staleMeter = makeStaleMeter(del); persistStaleMeter(staleMeter, nodeIdent); } diff --git a/applications/pom.xml b/applications/pom.xml index 55a67da9d3..85d84e3a54 100644 --- a/applications/pom.xml +++ b/applications/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 09b591fdbc..5460deb4d6 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/distribution/karaf/pom.xml b/distribution/karaf/pom.xml index c86334705a..839f5ee66f 100644 --- a/distribution/karaf/pom.xml +++ b/distribution/karaf/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent karaf4-parent - 6.0.0 + 6.0.1 org.opendaylight.openflowplugin openflowplugin-karaf diff --git a/extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml b/extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml index a6ee5e5cb2..beaccd714e 100644 --- a/extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml +++ b/extension/features-extension-aggregator/features-openflowplugin-extension/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.0 + 6.0.1 diff --git a/extension/features-extension-aggregator/odl-openflowplugin-eric-extensions/pom.xml b/extension/features-extension-aggregator/odl-openflowplugin-eric-extensions/pom.xml index a56b872d5a..db827b8e44 100644 --- a/extension/features-extension-aggregator/odl-openflowplugin-eric-extensions/pom.xml +++ b/extension/features-extension-aggregator/odl-openflowplugin-eric-extensions/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml b/extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml index bdf500c092..673dc9b4a6 100644 --- a/extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml +++ b/extension/features-extension-aggregator/odl-openflowplugin-nxm-extensions/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml b/extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml index 3f8534f436..308603404f 100644 --- a/extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml +++ b/extension/features-extension-aggregator/odl-openflowplugin-onf-extensions/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/extension/features-extension-aggregator/pom.xml b/extension/features-extension-aggregator/pom.xml index 779be77e19..e2393d1484 100644 --- a/extension/features-extension-aggregator/pom.xml +++ b/extension/features-extension-aggregator/pom.xml @@ -3,7 +3,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 4.0.0 diff --git a/extension/pom.xml b/extension/pom.xml index 1a1e5cdcd7..69fd17f7d7 100644 --- a/extension/pom.xml +++ b/extension/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/features-aggregator/features-openflowplugin/pom.xml b/features-aggregator/features-openflowplugin/pom.xml index f847e098cc..597ebd51a8 100644 --- a/features-aggregator/features-openflowplugin/pom.xml +++ b/features-aggregator/features-openflowplugin/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml b/features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml index 02be2cd907..5453d98317 100644 --- a/features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-arbitratorreconciliation/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml b/features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml index 169dbdeb68..95e2d9cdfb 100644 --- a/features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-bulk-o-matic/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml b/features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml index eb6c20dafe..c097b844c1 100644 --- a/features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-config-pusher/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml b/features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml index c28bdccd17..01008e149e 100644 --- a/features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-forwardingrules-manager/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml b/features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml index 75586c3b0a..eb2730a996 100644 --- a/features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-forwardingrules-sync/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml b/features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml index afe1acf250..c8924cdb65 100644 --- a/features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-lldp-speaker/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-notifications/pom.xml b/features-aggregator/odl-openflowplugin-app-notifications/pom.xml index ab7c028f8e..46ef6041fc 100644 --- a/features-aggregator/odl-openflowplugin-app-notifications/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-notifications/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml b/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml index 5527d3d1e4..ad0efe370c 100644 --- a/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml b/features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml index 023898558a..66c8d760e8 100644 --- a/features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-southbound-cli/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml b/features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml index 1b1a7b2a1c..981734c025 100644 --- a/features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-table-miss-enforcer/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml b/features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml index 09bc5b5ed1..3dc0521a27 100644 --- a/features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-topology-lldp-discovery/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml b/features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml index 6acfaaf650..0835acf2e3 100644 --- a/features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-topology-manager/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-app-topology/pom.xml b/features-aggregator/odl-openflowplugin-app-topology/pom.xml index 16674b5b20..89f5e99ee9 100644 --- a/features-aggregator/odl-openflowplugin-app-topology/pom.xml +++ b/features-aggregator/odl-openflowplugin-app-topology/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-drop-test/pom.xml b/features-aggregator/odl-openflowplugin-drop-test/pom.xml index 6e84bc8d72..dae8af1182 100644 --- a/features-aggregator/odl-openflowplugin-drop-test/pom.xml +++ b/features-aggregator/odl-openflowplugin-drop-test/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml b/features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml index 5197116059..5ac7142465 100644 --- a/features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml +++ b/features-aggregator/odl-openflowplugin-flow-services-rest/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-flow-services/pom.xml b/features-aggregator/odl-openflowplugin-flow-services/pom.xml index 26f25038cb..1cf4af304d 100644 --- a/features-aggregator/odl-openflowplugin-flow-services/pom.xml +++ b/features-aggregator/odl-openflowplugin-flow-services/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-libraries/pom.xml b/features-aggregator/odl-openflowplugin-libraries/pom.xml index 2b2c92c861..094c3d4572 100644 --- a/features-aggregator/odl-openflowplugin-libraries/pom.xml +++ b/features-aggregator/odl-openflowplugin-libraries/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/odl-openflowplugin-nsf-model/pom.xml b/features-aggregator/odl-openflowplugin-nsf-model/pom.xml index 4b30ddd133..21e001ba95 100644 --- a/features-aggregator/odl-openflowplugin-nsf-model/pom.xml +++ b/features-aggregator/odl-openflowplugin-nsf-model/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 @@ -21,7 +21,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.3 + 5.0.4 import pom diff --git a/features-aggregator/odl-openflowplugin-southbound/pom.xml b/features-aggregator/odl-openflowplugin-southbound/pom.xml index 68d1d95c34..1b70274e36 100644 --- a/features-aggregator/odl-openflowplugin-southbound/pom.xml +++ b/features-aggregator/odl-openflowplugin-southbound/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 diff --git a/features-aggregator/pom.xml b/features-aggregator/pom.xml index 55b1812181..2714ae9a0e 100644 --- a/features-aggregator/pom.xml +++ b/features-aggregator/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/libraries/pom.xml b/libraries/pom.xml index 7de94b32c0..210aedffcd 100644 --- a/libraries/pom.xml +++ b/libraries/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/model/model-flow-statistics/src/main/yang/opendaylight-meter-statistics.yang b/model/model-flow-statistics/src/main/yang/opendaylight-meter-statistics.yang index a41176e7d5..d764f7261a 100644 --- a/model/model-flow-statistics/src/main/yang/opendaylight-meter-statistics.yang +++ b/model/model-flow-statistics/src/main/yang/opendaylight-meter-statistics.yang @@ -148,7 +148,7 @@ module opendaylight-meter-statistics { // Empty request case } case multipart-request-meter-stats { - leaf meter-id { + leaf stat-meter-id { type meter-types:meter-id; } } diff --git a/model/pom.xml b/model/pom.xml index 10fb01e42d..1d5dd1d915 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -6,7 +6,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml b/openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml index 30074d8065..91d53cda08 100644 --- a/openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml +++ b/openflowjava/features-openflowjava-aggregator/features-openflowjava/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent feature-repo-parent - 6.0.0 + 6.0.1 diff --git a/openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml b/openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml index 3058b62b9a..f8266ca5a0 100644 --- a/openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml +++ b/openflowjava/features-openflowjava-aggregator/odl-openflowjava-protocol/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent single-feature-parent - 6.0.0 + 6.0.1 @@ -33,7 +33,7 @@ org.opendaylight.mdsal mdsal-artifacts - 5.0.3 + 5.0.4 import pom diff --git a/openflowjava/features-openflowjava-aggregator/pom.xml b/openflowjava/features-openflowjava-aggregator/pom.xml index 9e753e7cbf..66f9d23b22 100644 --- a/openflowjava/features-openflowjava-aggregator/pom.xml +++ b/openflowjava/features-openflowjava-aggregator/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/DeviceRequestFailedException.java b/openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/DeviceRequestFailedException.java index e5df8529e7..24438d01d2 100644 --- a/openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/DeviceRequestFailedException.java +++ b/openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/connection/DeviceRequestFailedException.java @@ -7,7 +7,8 @@ */ package org.opendaylight.openflowjava.protocol.api.connection; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.Error; @@ -21,12 +22,12 @@ public class DeviceRequestFailedException extends OutboundQueueException { public DeviceRequestFailedException(final String message, @NonNull final Error error) { super(message); - this.error = Preconditions.checkNotNull(error); + this.error = requireNonNull(error); } public DeviceRequestFailedException(final String message, @NonNull final Error error, final Throwable cause) { super(message, cause); - this.error = Preconditions.checkNotNull(error); + this.error = requireNonNull(error); } @NonNull public Error getError() { diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/DelegatingInboundHandler.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/DelegatingInboundHandler.java index 0278bfe48f..4dae69d4fb 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/DelegatingInboundHandler.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/DelegatingInboundHandler.java @@ -5,10 +5,10 @@ * 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.openflowjava.protocol.impl.core; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import org.opendaylight.openflowjava.protocol.impl.core.connection.ConnectionAdapterImpl; @@ -35,7 +35,7 @@ public class DelegatingInboundHandler extends ChannelInboundHandlerAdapter { */ public DelegatingInboundHandler(final MessageConsumer connectionAdapter) { LOG.trace("Creating DelegatingInboundHandler"); - consumer = Preconditions.checkNotNull(connectionAdapter); + consumer = requireNonNull(connectionAdapter); } @Override diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpConnectionInitializer.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpConnectionInitializer.java index c5a2aaf2bc..2c0f711f4e 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpConnectionInitializer.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/TcpConnectionInitializer.java @@ -5,10 +5,10 @@ * 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.openflowjava.protocol.impl.core; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import io.netty.bootstrap.Bootstrap; @@ -41,8 +41,7 @@ public class TcpConnectionInitializer implements ServerFacade, ConnectionInitial * @param workerGroup - shared worker group */ public TcpConnectionInitializer(EventLoopGroup workerGroup, boolean isEpollEnabled) { - Preconditions.checkNotNull(workerGroup, "WorkerGroup can't be null"); - this.workerGroup = workerGroup; + this.workerGroup = requireNonNull(workerGroup, "WorkerGroup can't be null"); this.isEpollEnabled = isEpollEnabled; } diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/VersionMessageWrapper.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/VersionMessageWrapper.java index 825e385d9f..e40d680f55 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/VersionMessageWrapper.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/VersionMessageWrapper.java @@ -5,10 +5,10 @@ * 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.openflowjava.protocol.impl.core; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import io.netty.buffer.ByteBuf; /** @@ -28,7 +28,7 @@ public class VersionMessageWrapper { */ public VersionMessageWrapper(final short version, final ByteBuf messageBuffer) { this.version = version; - this.messageBuffer = Preconditions.checkNotNull(messageBuffer); + this.messageBuffer = requireNonNull(messageBuffer); } /** diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractConnectionAdapter.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractConnectionAdapter.java index a07725951e..7544368d5b 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractConnectionAdapter.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractConnectionAdapter.java @@ -5,11 +5,11 @@ * 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.openflowjava.protocol.impl.core.connection; +import static java.util.Objects.requireNonNull; + import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Preconditions; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.cache.RemovalCause; @@ -101,7 +101,7 @@ abstract class AbstractConnectionAdapter implements ConnectionAdapter { AbstractConnectionAdapter(@NonNull final Channel channel, @Nullable final InetSocketAddress address, @Nullable final int channelOutboundQueueSize) { - this.channel = Preconditions.checkNotNull(channel); + this.channel = requireNonNull(channel); this.address = address; responseCache = CacheBuilder.newBuilder().concurrencyLevel(1) diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractOutboundQueueManager.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractOutboundQueueManager.java index f07895b44b..db77d1a747 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractOutboundQueueManager.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/AbstractOutboundQueueManager.java @@ -5,10 +5,11 @@ * 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.openflowjava.protocol.impl.core.connection; -import com.google.common.base.Preconditions; +import static com.google.common.base.Preconditions.checkArgument; +import static java.util.Objects.requireNonNull; + import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.util.concurrent.Future; @@ -83,8 +84,8 @@ abstract class AbstractOutboundQueueManager implements GenericFutureListener> getResult() { @@ -68,7 +70,7 @@ abstract class AbstractRpcListener implements GenericFutureListener manager; AbstractStackedOutboundQueue(final AbstractOutboundQueueManager manager) { - this.manager = Preconditions.checkNotNull(manager); + this.manager = requireNonNull(manager); firstSegment = StackedSegment.create(0L); uncompletedSegments.add(firstSegment); unflushedSegments.add(firstSegment); @@ -102,7 +103,7 @@ abstract class AbstractStackedOutboundQueue implements OutboundQueue { // Ensure we have the appropriate segment for the specified XID final StackedSegment slowSegment = firstSegment; final int slowOffset = (int) (xid - slowSegment.getBaseXid()); - Verify.verify(slowOffset >= 0); + verify(slowOffset >= 0); // Now, we let's see if we need to allocate a new segment ensureSegment(slowSegment, slowOffset); @@ -301,10 +302,10 @@ abstract class AbstractStackedOutboundQueue implements OutboundQueue { protected OutboundQueueEntry getEntry(final Long xid) { final StackedSegment fastSegment = firstSegment; final long calcOffset = xid - fastSegment.getBaseXid(); - Preconditions.checkArgument(calcOffset >= 0, "Commit of XID %s does not match up with base XID %s", + checkArgument(calcOffset >= 0, "Commit of XID %s does not match up with base XID %s", xid, fastSegment.getBaseXid()); - Verify.verify(calcOffset <= Integer.MAX_VALUE); + verify(calcOffset <= Integer.MAX_VALUE); final int fastOffset = (int) calcOffset; if (fastOffset >= StackedSegment.SEGMENT_SIZE) { @@ -315,7 +316,7 @@ abstract class AbstractStackedOutboundQueue implements OutboundQueue { synchronized (unflushedSegments) { final StackedSegment slowSegment = firstSegment; final long slowCalcOffset = xid - slowSegment.getBaseXid(); - Verify.verify(slowCalcOffset >= 0 && slowCalcOffset <= Integer.MAX_VALUE); + verify(slowCalcOffset >= 0 && slowCalcOffset <= Integer.MAX_VALUE); slowOffset = (int) slowCalcOffset; LOG.debug("Queue {} recalculated offset of XID {} to {}", this, xid, slowOffset); diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ChannelOutboundQueue.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ChannelOutboundQueue.java index c2c8e244c0..493237a3a0 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ChannelOutboundQueue.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ChannelOutboundQueue.java @@ -5,10 +5,12 @@ * 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.openflowjava.protocol.impl.core.connection; -import com.google.common.base.Preconditions; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkState; +import static java.util.Objects.requireNonNull; + import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; @@ -92,7 +94,7 @@ final class ChannelOutboundQueue extends ChannelInboundHandlerAdapter { private final InetSocketAddress address; ChannelOutboundQueue(final Channel channel, final int queueDepth, final InetSocketAddress address) { - Preconditions.checkArgument(queueDepth > 0, "Queue depth has to be positive"); + checkArgument(queueDepth > 0, "Queue depth has to be positive"); /* * This looks like a good trade-off for throughput. Alternative is @@ -101,7 +103,7 @@ final class ChannelOutboundQueue extends ChannelInboundHandlerAdapter { * to less throughput. */ this.queue = new LinkedBlockingQueue<>(queueDepth); - this.channel = Preconditions.checkNotNull(channel); + this.channel = requireNonNull(channel); this.maxWorkTime = TimeUnit.MICROSECONDS.toNanos(DEFAULT_WORKTIME_MICROS); this.address = address; } @@ -153,8 +155,7 @@ final class ChannelOutboundQueue extends ChannelInboundHandlerAdapter { } private void conditionalFlush(final ChannelHandlerContext ctx) { - Preconditions.checkState(ctx.channel().equals(channel), - "Inconsistent channel %s with context %s", channel, ctx); + checkState(ctx.channel().equals(channel), "Inconsistent channel %s with context %s", channel, ctx); conditionalFlush(); } diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ResponseExpectedRpcListener.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ResponseExpectedRpcListener.java index 6a60375765..edb5956a13 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ResponseExpectedRpcListener.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/ResponseExpectedRpcListener.java @@ -7,7 +7,8 @@ */ package org.opendaylight.openflowjava.protocol.impl.core.connection; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import com.google.common.cache.Cache; import java.util.concurrent.TimeoutException; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; @@ -22,8 +23,8 @@ final class ResponseExpectedRpcListener extends AbstractRpcL ResponseExpectedRpcListener(final Object message, final String failureInfo, final Cache> cache, final RpcResponseKey key) { super(message, failureInfo); - this.cache = Preconditions.checkNotNull(cache); - this.key = Preconditions.checkNotNull(key); + this.cache = requireNonNull(cache); + this.key = requireNonNull(key); } public void discard() { diff --git a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java index 0b4559eaec..92a92ebfb3 100644 --- a/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java +++ b/openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/StackedSegment.java @@ -7,11 +7,12 @@ */ package org.opendaylight.openflowjava.protocol.impl.core.connection; +import static com.google.common.base.Verify.verify; +import static java.util.Objects.requireNonNull; + import com.google.common.base.FinalizableReferenceQueue; import com.google.common.base.FinalizableSoftReference; import com.google.common.base.MoreObjects; -import com.google.common.base.Preconditions; -import com.google.common.base.Verify; import java.lang.ref.Reference; import java.util.concurrent.ConcurrentLinkedDeque; import org.opendaylight.openflowjava.protocol.api.connection.DeviceRequestFailedException; @@ -53,7 +54,7 @@ final class StackedSegment { StackedSegment(final long baseXid, final OutboundQueueEntry[] entries) { this.baseXid = baseXid; this.endXid = baseXid + SEGMENT_SIZE; - this.entries = Preconditions.checkNotNull(entries); + this.entries = requireNonNull(entries); } static StackedSegment create(final long baseXid) { @@ -151,7 +152,7 @@ final class StackedSegment { lastBarrierOffset = offset; final boolean success = completeEntry(entry, response); - Verify.verify(success, "Barrier request failed to complete"); + verify(success, "Barrier request failed to complete"); completeCount++; } else if (completeEntry(entry, response)) { completeCount++; diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestMeterStatsSerializer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestMeterStatsSerializer.java index 4230f24d35..40453b3980 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestMeterStatsSerializer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/multipart/MultipartRequestMeterStatsSerializer.java @@ -22,7 +22,7 @@ public class MultipartRequestMeterStatsSerializer implements OFSerializer org.opendaylight.mdsal binding-parent - 5.0.3 + 5.0.4 diff --git a/samples/pom.xml b/samples/pom.xml index d633724724..54b95b8f84 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 6.0.0 + 6.0.1 diff --git a/samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java b/samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java index 9242908aeb..fc70a14f35 100644 --- a/samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java +++ b/samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/CallableClient.java @@ -7,7 +7,8 @@ */ package org.opendaylight.openflowjava.protocol.impl.clients; -import com.google.common.base.Preconditions; +import static java.util.Objects.requireNonNull; + import com.google.common.util.concurrent.SettableFuture; import io.netty.bootstrap.Bootstrap; import io.netty.channel.EventLoopGroup; @@ -16,7 +17,6 @@ import java.net.InetAddress; import java.util.concurrent.Callable; import org.slf4j.LoggerFactory; - /** * Callable client class, inspired by SimpleClient class. * Simulating device/switch connected to controller. @@ -46,16 +46,13 @@ public class CallableClient implements Callable, OFClient { final ScenarioHandler scenarioHandler, final Bootstrap bootstrap, final EventLoopGroup eventExecutors) { - - Preconditions.checkNotNull(ipAddress, "IP address cannot be null"); - Preconditions.checkNotNull(scenarioHandler, "Scenario handler cannot be null"); this.port = port; this.securedClient = securedClient; - this.ipAddress = ipAddress; + this.ipAddress = requireNonNull(ipAddress, "IP address cannot be null"); this.workerGroup = eventExecutors; this.bootstrap = bootstrap; this.name = name; - this.scenarioHandler = scenarioHandler; + this.scenarioHandler = requireNonNull(scenarioHandler, "Scenario handler cannot be null"); } @Override @@ -82,8 +79,8 @@ public class CallableClient implements Callable, OFClient { @Override @SuppressWarnings("checkstyle:IllegalCatch") public Boolean call() throws Exception { - Preconditions.checkNotNull(bootstrap); - Preconditions.checkNotNull(workerGroup); + requireNonNull(bootstrap); + requireNonNull(workerGroup); LOG.info("Switch {} trying connect to controller", this.name); SimpleClientInitializer clientInitializer = new SimpleClientInitializer(isOnlineFuture, securedClient); clientInitializer.setScenario(scenarioHandler);