Merge "Added JSON and XML payloads tabs with RFC 8040 URL"
authorArunprakash D <d.arunprakash@ericsson.com>
Mon, 27 Jul 2020 15:43:29 +0000 (15:43 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 27 Jul 2020 15:43:29 +0000 (15:43 +0000)
138 files changed:
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/AbstractNodeConnectorCommitter.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/DeviceMastershipManager.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeConnectorInventoryTranslatorImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FrmReconciliationServiceImpl.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/GroupForwarder.java
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/MeterForwarder.java
extension/openflowjava-extension-eric/src/test/java/org/opendaylight/openflowjava/eric/codec/match/EricHeaderTest.java
extension/openflowjava-extension-eric/src/test/java/org/opendaylight/openflowjava/eric/codec/match/Icmpv6NDOptionsTypeCodecTest.java
extension/openflowjava-extension-eric/src/test/java/org/opendaylight/openflowjava/eric/codec/match/Icmpv6NDReservedCodecTest.java
extension/openflowjava-extension-nicira/src/main/java/org/opendaylight/openflowjava/nx/codec/action/ConntrackCodec.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/ActionDeserializerTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/ConntrackCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/CtClearCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/DecapCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/EncapCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/FinTimeoutCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/LearnCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/MultipathCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/OutputReg2CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/OutputRegCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/RegLoad2CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/RegLoadCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/RegMoveCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/action/ResubmitCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/AbstractNshcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/ArpOpCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/ArpShaCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/ArpSpaCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/ArpThaCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/ArpTpaCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/CtStateCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/CtTpDstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/CtTpSrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/CtZoneCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/EthDstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/EthSrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/EthTypeCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/IcmpTypeCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/IpDstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/IpSrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Ipv6DstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Ipv6SrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/MetadataCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NshFlagsCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NshMdtypeCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NshNpCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NshTtlCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NsiCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/NspCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/PktMarkCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg0CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg1CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg2CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg3CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg4CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg5CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg6CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/Reg7CodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/TcpDstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/TcpSrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/TunIdCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/TunIpv4DstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/TunIpv4SrcCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/UdpDstCodecTest.java
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/codec/match/UdpSrcCodecTest.java
model/model-flow-statistics/src/main/yang/opendaylight-flow-statistics.yang
openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/ExperimenterIdMeterSubTypeSerializerKey.java
openflowjava/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/ActionSerializerKeyTest.java
openflowjava/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/KeysTest.java
openflowjava/openflow-protocol-api/src/test/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterActionSerializerKeyTest.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/OFFrameDecoder.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10SetDlDstActionSerializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/action/OF10SetDlSrcActionSerializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/MultipartReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10FeaturesReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10PortModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10PortStatusMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10StatsReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortStatusMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/QueueGetConfigReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/AbstractOxmMacAddressSerializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/OF10MatchSerializer.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowModInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketOutInputMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/OF10QueueGetConfigReplyMessageFactoryTest.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/serialization/match/OxmPacketTypeSerializerTest.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/connection/listener/SystemNotificationsListenerImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/datastore/multipart/FlowStatsMultipartWriter.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/lifecycle/ContextChainHolderImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyTableFeaturesDeserializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/match/AbstractMatchEntrySerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/PortMessageSerializer.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalEchoServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/sal/SalPortServiceImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/MeterFeaturesService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsService.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/translator/FlowRemovedTranslator.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/common/MultipartRequestInputFactoryTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/ArpSourceHardwareAddressEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/ArpTargetHardwareAddressEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/EthernetDestinationEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/EthernetSourceEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6NdSllEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6NdTllEntryDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/messages/PortMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyFlowStatsDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMessageDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/MultipartReplyMeterConfigDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactoryTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/registry/flow/TestFlowHelper.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/AbstractRequestCallbackTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchFlowAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchGroupAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/batch/FlatBatchMeterAdaptersTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/NodeConfigServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalFlatBatchServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalPortServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/services/sal/SalTableServiceImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/MultipartReplyTranslatorTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtilsTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/TimeCounterTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/ofpspecific/MessageIntelligenceAgencyImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/FlatBatchUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/FlowUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/GroupUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/MatchUtilTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/util/MeterUtilTest.java

index bbc910831bc3430b4c03799e8ef02f7361c76b86..4dea1c378787b8412fb15a98467fe627d7c0b7d2 100644 (file)
@@ -57,7 +57,7 @@ public abstract class AbstractNodeConnectorCommitter<T extends DataObject>
      */
     protected abstract InstanceIdentifier<T> getWildCardPath();
 
-    private boolean preConfigurationCheck(final InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent) {
+    private static boolean preConfigurationCheck(final InstanceIdentifier<FlowCapableNodeConnector> nodeConnIdent) {
         Preconditions.checkNotNull(nodeConnIdent, "FlowCapableNodeConnector ident can not be null!");
         return true;
     }
index ede9d4845b1462eeefa4427f50cc2d1f84768692..ada3742e33b511c4b668ae03061a2249188676e8 100644 (file)
@@ -175,7 +175,7 @@ public class DeviceMastershipManager implements ClusteredDataTreeChangeListener<
         }
     }
 
-    private boolean compareInstanceIdentifierTail(final InstanceIdentifier<?> identifier1,
+    private static boolean compareInstanceIdentifierTail(final InstanceIdentifier<?> identifier1,
             final InstanceIdentifier<?> identifier2) {
         return Iterables.getLast(identifier1.getPathArguments())
                 .equals(Iterables.getLast(identifier2.getPathArguments()));
index cd4219f437cf04ec319e637cbf5ec48ab6d55bbe..5c9600f34ce706d9505393cbe63a4157b0d02638 100644 (file)
@@ -296,7 +296,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
         return true;
     }
 
-    private StaleFlow makeStaleFlow(InstanceIdentifier<Flow> identifier, Flow del,
+    private static StaleFlow makeStaleFlow(InstanceIdentifier<Flow> identifier, Flow del,
             InstanceIdentifier<FlowCapableNode> nodeIdent) {
         StaleFlowBuilder staleFlowBuilder = new StaleFlowBuilder(del);
         return staleFlowBuilder.setId(del.getId()).build();
@@ -311,7 +311,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
         handleStaleFlowResultFuture(submitFuture);
     }
 
-    private void handleStaleFlowResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleFlowResultFuture(FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
             public void onSuccess(Object result) {
@@ -326,7 +326,7 @@ public class FlowForwarder extends AbstractListeningCommiter<Flow> {
 
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
         .flow.inventory.rev130819.tables.table.StaleFlow> getStaleFlowInstanceIdentifier(
             StaleFlow staleFlow, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(Table.class, new TableKey(staleFlow.getTableId())).child(
index 87b5baa0bce7f50272822d14fe5587a64cf4de1f..f3cb90004323937d7a20dee6d09d06832507d105 100644 (file)
@@ -120,7 +120,7 @@ public class FlowNodeConnectorInventoryTranslatorImpl extends AbstractNodeConnec
         }
     }
 
-    private boolean compareInstanceIdentifierTail(InstanceIdentifier<?> identifier1,
+    private static boolean compareInstanceIdentifierTail(InstanceIdentifier<?> identifier1,
                                   InstanceIdentifier<?> identifier2) {
         return Iterables.getLast(identifier1.getPathArguments())
                 .equals(Iterables.getLast(identifier2.getPathArguments()));
@@ -132,7 +132,7 @@ public class FlowNodeConnectorInventoryTranslatorImpl extends AbstractNodeConnec
     }
 
 
-    private BigInteger getDpIdFromPortName(String portName) {
+    private static BigInteger getDpIdFromPortName(String portName) {
         String dpId = portName.substring(portName.indexOf(SEPARATOR) + 1, portName.lastIndexOf(SEPARATOR));
         return new BigInteger(dpId);
     }
index 86e3c8a1fed7d966bd3bf3addfde7ea6af5a3d93..db4741999e821c25f0c4919993daebee5e6a72e8 100644 (file)
@@ -143,7 +143,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
     private static final AtomicLong BUNDLE_ID = new AtomicLong();
     private static final BundleFlags BUNDLE_FLAGS = new BundleFlags(true, true);
-    private Map<String, ReconciliationState> reconciliationStates;
+    private final Map<String, ReconciliationState> reconciliationStates;
 
     public FlowNodeReconciliationImpl(final ForwardingRulesManager manager, final DataBroker db,
                                       final String serviceName, final int priority, final ResultState resultState,
@@ -595,8 +595,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
     @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
             justification = "https://github.com/spotbugs/spotbugs/issues/811")
-    private BigInteger getDpnIdFromNodeName(String nodeName) {
-
+    private static BigInteger getDpnIdFromNodeName(String nodeName) {
         String dpId = nodeName.substring(nodeName.lastIndexOf(SEPARATOR) + 1);
         return new BigInteger(dpId);
     }
@@ -721,7 +720,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
         handleStaleEntityDeletionResultFuture(submitFuture);
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
         .flow.inventory.rev130819.tables.table.StaleFlow> getStaleFlowInstanceIdentifier(
             StaleFlow staleFlow, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(Table.class, new TableKey(staleFlow.getTableId())).child(
@@ -729,13 +728,13 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
                 new StaleFlowKey(new FlowId(staleFlow.getId())));
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
         .group.types.rev131018.groups.StaleGroup> getStaleGroupInstanceIdentifier(
             StaleGroup staleGroup, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleGroup.class, new StaleGroupKey(new GroupId(staleGroup.getGroupId())));
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight
         .flow.inventory.rev130819.meters.StaleMeter> getStaleMeterInstanceIdentifier(
             StaleMeter staleMeter, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleMeter.class, new StaleMeterKey(new MeterId(staleMeter.getMeterId())));
@@ -763,7 +762,7 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
         return futureList;
     }
 
-    private void handleStaleEntityDeletionResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleEntityDeletionResultFuture(FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
             public void onSuccess(Object result) {
@@ -777,22 +776,20 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
         }, MoreExecutors.directExecutor());
     }
 
-    private Flow getDeleteAllFlow() {
-        final FlowBuilder flowBuilder = new FlowBuilder();
-        flowBuilder.setTableId(OFConstants.OFPTT_ALL);
-        return flowBuilder.build();
+    private static Flow getDeleteAllFlow() {
+        return new FlowBuilder().setTableId(OFConstants.OFPTT_ALL).build();
     }
 
-    private Group getDeleteAllGroup() {
-        final GroupBuilder groupBuilder = new GroupBuilder();
-        groupBuilder.setGroupType(GroupTypes.GroupAll);
-        groupBuilder.setGroupId(new GroupId(OFConstants.OFPG_ALL));
-        return groupBuilder.build();
+    private static Group getDeleteAllGroup() {
+        return new GroupBuilder()
+                .setGroupType(GroupTypes.GroupAll)
+                .setGroupId(new GroupId(OFConstants.OFPG_ALL))
+                .build();
     }
 
     @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
             justification = "https://github.com/spotbugs/spotbugs/issues/811")
-    private Messages createMessages(final NodeRef nodeRef) {
+    private static Messages createMessages(final NodeRef nodeRef) {
         final List<Message> messages = new ArrayList<>();
         messages.add(new MessageBuilder().setNode(nodeRef)
                 .setBundleInnerMessage(new BundleRemoveFlowCaseBuilder()
index c0dd07a6515a1c6531ce928674ea7384244c0dfe..f61abcad9b7d3dac587384e8c65a146a11aebac1 100644 (file)
@@ -45,7 +45,7 @@ public class FrmReconciliationServiceImpl implements FrmReconciliationService {
         this.forwardingRulesManagerImpl = forwardingRulesManagerImpl;
     }
 
-    private Node buildNode(long nodeIid) {
+    private static Node buildNode(long nodeIid) {
         NodeId nodeId = new NodeId("openflow:" + nodeIid);
         Node nodeDpn = new NodeBuilder().setId(nodeId).withKey(new NodeKey(nodeId)).build();
         return nodeDpn;
index cbb28503d73d05ab35aa7b02ff5a7a17307242ec..eae69f575297e68fbf261574be5312bd9f7e8968 100644 (file)
@@ -210,7 +210,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
 
     }
 
-    private StaleGroup makeStaleGroup(InstanceIdentifier<Group> identifier, Group del,
+    private static StaleGroup makeStaleGroup(InstanceIdentifier<Group> identifier, Group del,
             InstanceIdentifier<FlowCapableNode> nodeIdent) {
         StaleGroupBuilder staleGroupBuilder = new StaleGroupBuilder(del);
         return staleGroupBuilder.setGroupId(del.getGroupId()).build();
@@ -225,7 +225,7 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
         handleStaleGroupResultFuture(submitFuture);
     }
 
-    private void handleStaleGroupResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleGroupResultFuture(FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
             public void onSuccess(Object result) {
@@ -237,10 +237,9 @@ public class GroupForwarder extends AbstractListeningCommiter<Group> {
                 LOG.error("Stale Group creation failed", throwable);
             }
         }, MoreExecutors.directExecutor());
-
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.group
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.group
         .types.rev131018.groups.StaleGroup> getStaleGroupInstanceIdentifier(
             StaleGroup staleGroup, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleGroup.class, new StaleGroupKey(new GroupId(staleGroup.getGroupId())));
index 09282388d4d98938413eacdc7ad12df631761978..210bb1eb6f48e5b7cf3e24fadd2080a42605c5cd 100644 (file)
@@ -154,7 +154,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         persistStaleMeter(staleMeter, nodeIdent);
     }
 
-    private StaleMeter makeStaleMeter(Meter del) {
+    private static StaleMeter makeStaleMeter(Meter del) {
         StaleMeterBuilder staleMeterBuilder = new StaleMeterBuilder(del);
         return staleMeterBuilder.setMeterId(del.getMeterId()).build();
     }
@@ -168,7 +168,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         handleStaleMeterResultFuture(submitFuture);
     }
 
-    private void handleStaleMeterResultFuture(FluentFuture<?> submitFuture) {
+    private static void handleStaleMeterResultFuture(FluentFuture<?> submitFuture) {
         submitFuture.addCallback(new FutureCallback<Object>() {
             @Override
             public void onSuccess(Object result) {
@@ -182,7 +182,7 @@ public class MeterForwarder extends AbstractListeningCommiter<Meter> {
         }, MoreExecutors.directExecutor());
     }
 
-    private InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819
+    private static InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819
         .meters.StaleMeter> getStaleMeterInstanceIdentifier(
             StaleMeter staleMeter, InstanceIdentifier<FlowCapableNode> nodeIdent) {
         return nodeIdent.child(StaleMeter.class, new StaleMeterKey(new MeterId(staleMeter.getMeterId())));
index 239881b05be99335d00fa67eb76ea996674f32db..88609dda0aa45ba139dd237b3114301741ba4374 100644 (file)
@@ -5,7 +5,6 @@
  * 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.eric.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -60,7 +59,7 @@ public class EricHeaderTest {
         assertEquals(shouldBe, ericHeader.toString());
     }
 
-    private long createHeader() {
+    private static long createHeader() {
         long result = 0;
         int oxmClass = 4096 << 16;
         result = result | oxmClass;
@@ -72,5 +71,4 @@ public class EricHeaderTest {
         result = result | length;
         return result;
     }
-
 }
\ No newline at end of file
index 78c1d28c6a9ad028af3dc7ff304c45ea81fa1d6d..0e3ebe5da2c7e34a50e8af77b69200f97bf70688 100644 (file)
@@ -5,7 +5,6 @@
  * 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.eric.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -23,7 +22,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.eric.match.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.eric.match.rev180730.oxm.container.match.entry.value.Icmpv6NdOptionsTypeCaseValue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.eric.match.rev180730.oxm.container.match.entry.value.Icmpv6NdOptionsTypeCaseValueBuilder;
 
-
 public class Icmpv6NDOptionsTypeCodecTest {
 
     private static final int ERIC_FIELD_CODE = 2;
@@ -66,7 +64,7 @@ public class Icmpv6NDOptionsTypeCodecTest {
         assertEquals(2, result.getIcmpv6NdOptionsTypeValues().getIcmpv6NdOptionsType().shortValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final Icmpv6NdOptionsTypeCaseValueBuilder caseBuilder = new Icmpv6NdOptionsTypeCaseValueBuilder();
         final Icmpv6NdOptionsTypeValuesBuilder valuesBuilder = new Icmpv6NdOptionsTypeValuesBuilder();
@@ -82,7 +80,7 @@ public class Icmpv6NDOptionsTypeCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EricConstants.ERICOXM_OF_EXPERIMENTER_ID);
 
         int fieldMask = ERIC_FIELD_CODE << 1;
@@ -90,5 +88,4 @@ public class Icmpv6NDOptionsTypeCodecTest {
         message.writeByte(VALUE_LENGTH);
         message.writeByte(2);
     }
-
 }
\ No newline at end of file
index fd66b61f0bdccd56051f8c991c90d47e2cc90a21..e3ae5dc098bf45f0e26caad1822fac243d701de3 100644 (file)
@@ -5,7 +5,6 @@
  * 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.eric.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -64,7 +63,7 @@ public class Icmpv6NDReservedCodecTest {
         assertEquals(2, result.getIcmpv6NdReservedValues().getIcmpv6NdReserved().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final Icmpv6NdReservedCaseValueBuilder caseBuilder = new Icmpv6NdReservedCaseValueBuilder();
         final Icmpv6NdReservedValuesBuilder valuesBuilder = new Icmpv6NdReservedValuesBuilder();
@@ -79,7 +78,7 @@ public class Icmpv6NDReservedCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EricConstants.ERICOXM_OF_EXPERIMENTER_ID);
         int fieldMask = ERIC_FIELD_CODE << 1;
         message.writeByte(fieldMask);
index fb817af1fbb94e992e908be3bff754b70da72ae2..1545338ad68914747c2ccfc3d17955b37fde1c51 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.action;
 
 import com.google.common.net.InetAddresses;
@@ -76,7 +75,7 @@ public class ConntrackCodec extends AbstractActionCodec {
         serializeCtAction(outBuffer,action);
     }
 
-    private int getActionLength(final ActionConntrack action) {
+    private static int getActionLength(final ActionConntrack action) {
         int length = 0;
         List<CtActions> ctActionsList = action.getNxActionConntrack().getCtActions();
         if (ctActionsList == null) {
@@ -97,7 +96,7 @@ public class ConntrackCodec extends AbstractActionCodec {
         return length;
     }
 
-    private int getNatActionLength(final NxActionNat natAction) {
+    private static int getNatActionLength(final NxActionNat natAction) {
         int natLength = NX_NAT_LENGTH;
         short rangePresent = natAction.getRangePresent().shortValue();
         if (0 != (rangePresent & NxActionNatRangePresent.NXNATRANGEIPV4MIN.getIntValue())) {
@@ -113,10 +112,9 @@ public class ConntrackCodec extends AbstractActionCodec {
             natLength += SHORT_LENGTH;
         }
         return natLength;
-
     }
 
-    private void serializeCtAction(final ByteBuf outBuffer, final ActionConntrack action) {
+    private static void serializeCtAction(final ByteBuf outBuffer, final ActionConntrack action) {
         List<CtActions> ctActionsList = action.getNxActionConntrack().getCtActions();
         if (ctActionsList != null) {
             for (CtActions ctActions : ctActionsList) {
@@ -196,8 +194,8 @@ public class ConntrackCodec extends AbstractActionCodec {
         return actionBuilder.build();
     }
 
-    private void deserializeCtAction(final ByteBuf message, final NxActionConntrackBuilder nxActionConntrackBuilder,
-            final int ctActionsLength) {
+    private static void deserializeCtAction(final ByteBuf message,
+            final NxActionConntrackBuilder nxActionConntrackBuilder, final int ctActionsLength) {
         List<CtActions> ctActionsList = new ArrayList<>();
         int processedCtActionsLength = ctActionsLength;
 
@@ -265,7 +263,7 @@ public class ConntrackCodec extends AbstractActionCodec {
         nxActionConntrackBuilder.setCtActions(ctActionsList);
     }
 
-    private short deserializeCtHeaderWithoutSubtype(final ByteBuf message) {
+    private static short deserializeCtHeaderWithoutSubtype(final ByteBuf message) {
         // size of experimenter type / size of set field code (in case of ct_mark)
         message.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         // size of length
@@ -275,7 +273,7 @@ public class ConntrackCodec extends AbstractActionCodec {
         return length;
     }
 
-    private short deserializeCtHeader(final ByteBuf message) {
+    private static short deserializeCtHeader(final ByteBuf message) {
         short length = deserializeCtHeaderWithoutSubtype(message);
         // subtype
         message.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
index 56d54841292b823d078719b2ef31aeae2055c29d..0fa709408e2b55a22571ee0a22c9d88d1981abf5 100644 (file)
@@ -86,7 +86,7 @@ public class ActionDeserializerTest {
         Mockito.verify(deserializer).deserialize(buffer);
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         //size of experiment type
         message.writeShort(1);
         //size of length
@@ -97,7 +97,7 @@ public class ActionDeserializerTest {
         message.writeShort(SUBTYPE);
     }
 
-    private void createBufferWithWrongExperimentId(ByteBuf message) {
+    private static void createBufferWithWrongExperimentId(ByteBuf message) {
         //size of experiment type
         message.writeShort(1);
         //size of length
index 0586807fe04ecec5efb973f74a35915fbb77035b..b6f39814064d81d6960d54fbccad24bd842934ad 100644 (file)
@@ -166,7 +166,7 @@ public class ConntrackCodecTest {
         Assert.assertEquals(4, result.getNxActionConntrack().getRecircTable().byteValue());
     }
 
-    private Action createAction() {
+    private static Action createAction() {
 
         NxActionConntrackBuilder nxActionConntrackBuilder = new NxActionConntrackBuilder();
         nxActionConntrackBuilder.setFlags(1);
@@ -218,7 +218,7 @@ public class ConntrackCodecTest {
         return actionBuilder.build();
     }
 
-    private Action createActionWithoutCtAction() {
+    private static Action createActionWithoutCtAction() {
 
         NxActionConntrackBuilder nxActionConntrackBuilder = new NxActionConntrackBuilder();
         nxActionConntrackBuilder.setFlags(1);
index b9dd5727a93fd576d62545db0988bf70e2fc04e5..8656f05d85d70fa467f005b304552dea8d1a4701 100644 (file)
@@ -63,7 +63,7 @@ public class CtClearCodecTest {
 
     }
 
-    private Action createAction() {
+    private static Action createAction() {
 
         NxActionCtClearBuilder nxActionCtClearBuilder = new NxActionCtClearBuilder();
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
index 78fca58b55916989899e8bb7f76225ce7ea7f8f5..f283948c771e7e1b4a2f4ed9b8c3b14cde0e99f4 100644 (file)
@@ -69,7 +69,7 @@ public class DecapCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
@@ -78,7 +78,7 @@ public class DecapCodecTest {
         message.writeInt((int) PACKET_TYPE);
     }
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
index 83828d1ca7b2576abb574f11feac61e7d8358c1a..4f9b6a4412b7a103f246bc7577709ab24ad8b5f6 100644 (file)
@@ -70,7 +70,7 @@ public class EncapCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
@@ -79,7 +79,7 @@ public class EncapCodecTest {
         message.writeInt((int) PACKET_TYPE);
     }
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
index 86536016940911635dd6cfde314e5ebd70465ed5..e24a04916dc08afe12ce1da92bf77238486e47ef 100644 (file)
@@ -88,7 +88,7 @@ public class FinTimeoutCodecTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private Action createAction(Short idleTimeout, Short hardTimeout) {
+    private static Action createAction(Short idleTimeout, Short hardTimeout) {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -108,7 +108,7 @@ public class FinTimeoutCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index c72dc20094dd81c097b3892b62e9f1e0907dd4ba..a146c6ce4ebb0ed7e283ecb5c84b929e06c5ed48 100644 (file)
@@ -79,7 +79,7 @@ public class LearnCodecTest {
 
     @Test
     public void deserializeTest() {
-        createBufer(buffer);
+        createBuffer(buffer);
         action = learnCodec.deserialize(buffer);
 
         ActionLearn result = (ActionLearn) action.getActionChoice();
@@ -121,9 +121,7 @@ public class LearnCodecTest {
         Assert.assertEquals(0, buffer.readableBytes());
     }
 
-
-
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -145,7 +143,7 @@ public class LearnCodecTest {
         return actionBuilder.build();
     }
 
-    private List<FlowMods> createFlowMods() {
+    private static List<FlowMods> createFlowMods() {
 
         final List<FlowMods> flowMods = new ArrayList<>();
         //length = 14
@@ -212,7 +210,7 @@ public class LearnCodecTest {
         return flowMods;
     }
 
-    private void createBufer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LEARN_HEADER_LEN + 56);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
@@ -255,7 +253,7 @@ public class LearnCodecTest {
         message.writeShort(10);
     }
 
-    private void toFlowModSpecHeader(ByteBuf message, int src, int dst) {
+    private static void toFlowModSpecHeader(ByteBuf message, int src, int dst) {
         short value = 0;
         short bitNum = 48;
         value |= src << 13;
index f3dcad8035908e9ef75fd86f09e28dabcf74e1d3..3bd87ba5a9582b9206222b50b4f589c14132cf1c 100644 (file)
@@ -79,7 +79,7 @@ public class MultipathCodecTest {
     }
 
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -104,7 +104,7 @@ public class MultipathCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index a4f1d64e01facbb484ae65ef5c9f8c5a4edf075d..a018aef1cbc8941a6dfedc9392628bc35dc44679 100644 (file)
@@ -119,7 +119,7 @@ public class OutputReg2CodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private Action createAction(final Uint64 src) {
+    private static Action createAction(final Uint64 src) {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -136,7 +136,7 @@ public class OutputReg2CodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(final ByteBuf message, final boolean withExpSrc) {
+    private static void createBuffer(final ByteBuf message, final boolean withExpSrc) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index c313a78c78867d15fb53e53765901c53dda423e8..8a947d7ed9fd9699f9a4c8273a87485d132c15de 100644 (file)
@@ -71,7 +71,7 @@ public class OutputRegCodecTest {
     }
 
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -88,7 +88,7 @@ public class OutputRegCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index 3ba396cdb496267328bddd538283a1294d99bf3d..fdf26c34f0b400ae75b10c5e603cca545cc1f1d9 100644 (file)
@@ -111,7 +111,7 @@ public class RegLoad2CodecTest {
         assertEquals(RegLoad2Codec.SUBTYPE, out.readUnsignedShort());
     }
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterBuilder experimenterBuilder = new ExperimenterBuilder();
         experimenterBuilder.setExperimenter(new ExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID));
         ExperimenterIdCaseBuilder expCaseBuilder = new ExperimenterIdCaseBuilder();
index 4ca3c5d73332c987e039ce62a0ee6daf500510ce..90e790f82008bd56b3f9b0aca97d9c3933d38887 100644 (file)
@@ -68,7 +68,7 @@ public class RegLoadCodecTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -85,7 +85,7 @@ public class RegLoadCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index eb9134c464828c0d8797b59071ea8ec749c32c47..2170c5cbf7841f36b72679bf8630b7680063d0a6 100644 (file)
@@ -155,7 +155,7 @@ public class RegMoveCodecTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private Action createAction(Uint64 src, Uint64 dst) {
+    private static Action createAction(Uint64 src, Uint64 dst) {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -174,7 +174,7 @@ public class RegMoveCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message, boolean withExpSrc, boolean withExpDst) {
+    private static void createBuffer(ByteBuf message, boolean withExpSrc, boolean withExpDst) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         int length = withExpSrc || withExpDst ? 32 : 24;
         message.writeShort(length);
index 4f47d65b67d870c894d1baf7536d4bb2c969fdc7..e26542019e74a25656f0101907e5f9c79d1628b8 100644 (file)
@@ -61,8 +61,7 @@ public class ResubmitCodecTest {
      */
     @Test
     public void getSubTypeTest2() {
-        Byte table = new Byte((byte)1);
-        action = createAction(null, table);
+        action = createAction(null, (byte)1);
         ActionResubmit actionResubmit = (ActionResubmit) action.getActionChoice();
 
         byte result = resubmitCodec.getSubType(actionResubmit);
@@ -124,7 +123,7 @@ public class ResubmitCodecTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private Action createAction(Short inPort, Byte table) {
+    private static Action createAction(Short inPort, Byte table) {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
@@ -144,7 +143,7 @@ public class ResubmitCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
index 9c8cd1529559e4898dfe406945f445ad58240557..cfdc2cf7ec6a90a6e18e2c05155f877d7133bbd4 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -90,12 +89,11 @@ public class AbstractNshcCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-
-    private NxExpMatchEntryValue createMatchEntryValue(final Long value, final Long mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(final Long value, final Long mask) {
         return new NshcCaseValueBuilder().setNshc(value).setMask(mask).build();
     }
 
-    private void writeBuffer(final ByteBuf message, final Long value, final Long mask) {
+    private static void writeBuffer(final ByteBuf message, final Long value, final Long mask) {
         message.writeInt(value.intValue());
         if (mask != null) {
             message.writeInt(mask.intValue());
index 35638d7371b3114fabbe253631281d0303d54263..ee98779542a258b9dc3a293bd0c6b889f78fde2f 100644 (file)
@@ -65,10 +65,7 @@ public class ArpOpCodecTest {
         assertEquals(2, result.getArpOpValues().getValue().shortValue());
     }
 
-
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final ArpOpCaseValueBuilder caseBuilder = new ArpOpCaseValueBuilder();
         final ArpOpValuesBuilder valuesBuilder = new ArpOpValuesBuilder();
@@ -84,7 +81,7 @@ public class ArpOpCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index ac0abf2d767ca759f9c4d86fdde4c5abbd0beb99..a5dae6551dec70c39b5ebd576db342e911cf1549 100644 (file)
@@ -72,7 +72,7 @@ public class ArpShaCodecTest {
     }
 
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final ArpShaCaseValueBuilder caseBuilder = new ArpShaCaseValueBuilder();
         final ArpShaValuesBuilder valuesBuilder = new ArpShaValuesBuilder();
@@ -91,7 +91,7 @@ public class ArpShaCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 6c27dbf8cbe30ffdf9b55d64fb1aee3f7e86fb46..4e7465fef28428b105b88a2181a08131493eae78 100644 (file)
@@ -64,8 +64,7 @@ public class ArpSpaCodecTest {
         assertEquals(2, result.getArpSpaValues().getValue().shortValue());
     }
 
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final ArpSpaCaseValueBuilder caseBuilder = new ArpSpaCaseValueBuilder();
         final ArpSpaValuesBuilder valuesBuilder = new ArpSpaValuesBuilder();
@@ -81,7 +80,7 @@ public class ArpSpaCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 3415c17897cc4464fe0a91ccc8c75e7c6c296ac2..9c8b79cdb9cf954da4a6ad8976c2ffd2d2320a98 100644 (file)
@@ -68,7 +68,7 @@ public class ArpThaCodecTest {
         assertEquals(TEST_ADDRESS, result.getArpThaValues().getMacAddress());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final ArpThaCaseValueBuilder caseBuilder = new ArpThaCaseValueBuilder();
         final ArpThaValuesBuilder valuesBuilder = new ArpThaValuesBuilder();
@@ -86,7 +86,7 @@ public class ArpThaCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 153cf1c8f3a58df7b308e23701e602433f2f1dc5..244fa7123a1cd648e8a317db5a8b8aa732ea31b1 100644 (file)
@@ -63,7 +63,7 @@ public class ArpTpaCodecTest {
         assertEquals(2, result.getArpTpaValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final ArpTpaCaseValueBuilder caseBuilder = new ArpTpaCaseValueBuilder();
         final ArpTpaValuesBuilder valuesBuilder = new ArpTpaValuesBuilder();
@@ -79,7 +79,7 @@ public class ArpTpaCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 2fe1d4d92820500146a9a3767efab74c4cc86f3f..6e5a6c491e13a484222996fc1d1f774f0e489d4f 100644 (file)
@@ -65,7 +65,7 @@ public class CtStateCodecTest {
         assertEquals(2, result.getCtStateValues().getMask().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final CtStateCaseValueBuilder caseBuilder = new CtStateCaseValueBuilder();
         final CtStateValuesBuilder valuesBuilder = new CtStateValuesBuilder();
@@ -82,7 +82,7 @@ public class CtStateCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 02951bf43734c61524388d2a4c14107975644ac5..1ecd545009857671c5b4c96bdca7bc8aed1fa1cf 100644 (file)
@@ -63,7 +63,7 @@ public class CtTpDstCodecTest {
         assertEquals(2, result.getCtTpDstValues().getCtTpDst().shortValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final CtTpDstCaseValueBuilder caseBuilder = new CtTpDstCaseValueBuilder();
         final CtTpDstValuesBuilder valuesBuilder = new CtTpDstValuesBuilder();
@@ -79,7 +79,7 @@ public class CtTpDstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index ee97c924528528e59319f79e8b3e13cd1bcfcbd2..db3a738f494fef72489254cfc494ed1244840e3e 100644 (file)
@@ -63,7 +63,7 @@ public class CtTpSrcCodecTest {
         assertEquals(2, result.getCtTpSrcValues().getCtTpSrc().shortValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final CtTpSrcCaseValueBuilder caseBuilder = new CtTpSrcCaseValueBuilder();
         final CtTpSrcValuesBuilder valuesBuilder = new CtTpSrcValuesBuilder();
@@ -79,7 +79,7 @@ public class CtTpSrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index c90d7a0a9d6a68d52d5bff7828d16184b3c7e8d3..fadb9900588fddd69f7c6df4a3826c989337f3ca 100644 (file)
@@ -66,7 +66,7 @@ public class CtZoneCodecTest {
     }
 
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final CtZoneCaseValueBuilder caseBuilder = new CtZoneCaseValueBuilder();
         final CtZoneValuesBuilder valuesBuilder = new CtZoneValuesBuilder();
@@ -82,7 +82,7 @@ public class CtZoneCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index d1be550d52bee71ea5678ba0c9a16ea20e7d5dfe..d5d4655213b44bc862c3f72090d442f8ad02ac05 100644 (file)
@@ -69,9 +69,7 @@ public class EthDstCodecTest {
         assertEquals(TEST_ADDRESS, result.getEthDstValues().getMacAddress());
     }
 
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final EthDstCaseValueBuilder caseBuilder = new EthDstCaseValueBuilder();
         final EthDstValuesBuilder valuesBuilder = new EthDstValuesBuilder();
@@ -89,7 +87,7 @@ public class EthDstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 213ac242b178aaaffafa154f85edda4b9fafd10c..1e98ffb71fdb2f8c64cdf40c0d7977b4c76f51f9 100644 (file)
@@ -70,9 +70,7 @@ public class EthSrcCodecTest {
         assertEquals(TEST_ADDRESS, result.getEthSrcValues().getMacAddress());
     }
 
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final EthSrcCaseValueBuilder caseBuilder = new EthSrcCaseValueBuilder();
         final EthSrcValuesBuilder valuesBuilder = new EthSrcValuesBuilder();
@@ -91,7 +89,7 @@ public class EthSrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index fad544c0df04c247f39ca9ae258ff3b9f833d436..7abba8fb3d22846ff414968358149b28c5cc064b 100644 (file)
@@ -64,9 +64,7 @@ public class EthTypeCodecTest {
         assertEquals(2, result.getEthTypeValues().getValue().shortValue());
     }
 
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final EthTypeCaseValueBuilder caseBuilder = new EthTypeCaseValueBuilder();
         final EthTypeValuesBuilder valuesBuilder = new EthTypeValuesBuilder();
@@ -82,7 +80,7 @@ public class EthTypeCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 19ca6df14c1c71f1637f6831e62322c24055fe16..9ac0781b0ac83e6b8fee6707d4743d6560acd23d 100644 (file)
@@ -64,10 +64,7 @@ public class IcmpTypeCodecTest {
         assertEquals(2, result.getIcmpTypeValues().getValue().shortValue());
     }
 
-
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final IcmpTypeCaseValueBuilder caseBuilder = new IcmpTypeCaseValueBuilder();
         final IcmpTypeValuesBuilder valuesBuilder = new IcmpTypeValuesBuilder();
@@ -83,7 +80,7 @@ public class IcmpTypeCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index b742eacbb93b47a4c7817eace6cdae127d0c673d..3bf47ac7bb04c0d55e21b167990b0b0abc180d86 100644 (file)
@@ -64,8 +64,7 @@ public class IpDstCodecTest {
         assertEquals(2, result.getIpDstValues().getValue().intValue());
     }
 
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final IpDstCaseValueBuilder caseBuilder = new IpDstCaseValueBuilder();
         final IpDstValuesBuilder valuesBuilder = new IpDstValuesBuilder();
@@ -81,7 +80,7 @@ public class IpDstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 4851869fe9e1373766f37edc7f379523a720807a..3298195288839a50412b0032dd5c1f5282de7f9e 100644 (file)
@@ -64,7 +64,7 @@ public class IpSrcCodecTest {
         assertEquals(2, result.getIpSrcValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final IpSrcCaseValueBuilder caseBuilder = new IpSrcCaseValueBuilder();
         final IpSrcValuesBuilder valuesBuilder = new IpSrcValuesBuilder();
@@ -80,7 +80,7 @@ public class IpSrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 3af95c3b76ad38bf4cb19331c1afaedebe7e390f..64c19d38133d88e24927e32d195a5433c4421c0d 100644 (file)
@@ -64,8 +64,7 @@ public class Ipv6DstCodecTest {
         assertEquals(2, result.getIpDstValues().getValue().intValue());
     }
 
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final IpDstCaseValueBuilder caseBuilder = new IpDstCaseValueBuilder();
         final IpDstValuesBuilder valuesBuilder = new IpDstValuesBuilder();
@@ -81,7 +80,7 @@ public class Ipv6DstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index cd869b5f2c6b9bf66c44465f737b8aabe81f684c..3b908f46044d28e8d6b402cd103d5199bd6839d8 100644 (file)
@@ -64,7 +64,7 @@ public class Ipv6SrcCodecTest {
         assertEquals(2, result.getIpSrcValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final IpSrcCaseValueBuilder caseBuilder = new IpSrcCaseValueBuilder();
         final IpSrcValuesBuilder valuesBuilder = new IpSrcValuesBuilder();
@@ -80,7 +80,7 @@ public class Ipv6SrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index bf54681f08897cd151a7d1659d6ba2c2e309ffe4..d562c14bab6f6e2905b3ec8b257783c159a78049 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -58,7 +57,7 @@ public class MetadataCodecTest {
         assertEquals(false, input.isHasMask());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         matchEntryBuilder.setOxmClass(Nxm0Class.class);
         matchEntryBuilder.setOxmMatchField(NxmOfMetadata.class);
@@ -72,11 +71,10 @@ public class MetadataCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
-        int fieldMask = (NXM_FIELD_CODE << 1);
+        int fieldMask = NXM_FIELD_CODE << 1;
         message.writeByte(fieldMask);
         message.writeByte(VALUE_LENGTH);
     }
-
 }
\ No newline at end of file
index ca1fffc706b717bd463692a892ec97caa2f277a1..070cfaa2998ca2b85a0e8add378d68e056b1184d 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -78,13 +77,12 @@ public class NshFlagsCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-
-    private NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
         NshFlagsValues nshFlagsValues = new NshFlagsValuesBuilder().setNshFlags(value).setMask(mask).build();
         return new NshFlagsCaseValueBuilder().setNshFlagsValues(nshFlagsValues).build();
     }
 
-    private void writeBuffer(ByteBuf message, Short value, Short mask) {
+    private static void writeBuffer(ByteBuf message, Short value, Short mask) {
         message.writeByte(value.intValue());
         if (mask != null) {
             message.writeByte(mask.intValue());
index e09e4cf61c33c13ecd217af879539410ad049385..78911c26fac04e7a5e7bb6779d0a1f844736be3d 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -55,12 +54,12 @@ public class NshMdtypeCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private NxExpMatchEntryValue createMatchEntryValue(Short value) {
+    private static NxExpMatchEntryValue createMatchEntryValue(Short value) {
         NshMdtypeValues nshMdtypeValues = new NshMdtypeValuesBuilder().setValue(value).build();
         return new NshMdtypeCaseValueBuilder().setNshMdtypeValues(nshMdtypeValues).build();
     }
 
-    private void writeBuffer(ByteBuf message, Short value) {
+    private static void writeBuffer(ByteBuf message, Short value) {
         message.writeByte(value.intValue());
     }
 }
\ No newline at end of file
index 2ec179cbb539a001ddd995ff0dfc1dd68d5cc8ba..b6a933a7e7a67f2273e509ebaec21304a5dee22a 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -55,12 +54,12 @@ public class NshNpCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private NxExpMatchEntryValue createMatchEntryValue(Short value) {
+    private static NxExpMatchEntryValue createMatchEntryValue(Short value) {
         NshNpValues nshNpValues = new NshNpValuesBuilder().setValue(value).build();
         return new NshNpCaseValueBuilder().setNshNpValues(nshNpValues).build();
     }
 
-    private void writeBuffer(ByteBuf message, Short value) {
+    private static void writeBuffer(ByteBuf message, Short value) {
         message.writeByte(value.intValue());
     }
 }
\ No newline at end of file
index c75e1f41e4a843748f93334799ab159c24df5390..91507cd575fac0dde82713f4acb8c4c12e1aae40 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -78,13 +77,12 @@ public class NshTtlCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-
-    private NxExpMatchEntryValue createMatchEntryValue(final Short value, final Short mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(final Short value, final Short mask) {
         NshTtlValues nshTtlValues = new NshTtlValuesBuilder().setNshTtl(value).setMask(mask).build();
         return new NshTtlCaseValueBuilder().setNshTtlValues(nshTtlValues).build();
     }
 
-    private void writeBuffer(final ByteBuf message, final Short value, final Short mask) {
+    private static void writeBuffer(final ByteBuf message, final Short value, final Short mask) {
         message.writeByte(value.intValue());
         if (mask != null) {
             message.writeByte(mask.intValue());
index 1c2b0e6610a04427c62ef65cabd78e3b9bea8e21..ba1e1e3a37ecf0519583415f2bf1cd2b3557da15 100644 (file)
@@ -77,12 +77,12 @@ public class NsiCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-    private NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
         NsiValues nsiValues = new NsiValuesBuilder().setNsi(value).setMask(mask).build();
         return new NsiCaseValueBuilder().setNsiValues(nsiValues).build();
     }
 
-    private void writeBuffer(ByteBuf message, Short value, Short mask) {
+    private static void writeBuffer(ByteBuf message, Short value, Short mask) {
         message.writeByte(value.intValue());
         if (mask != null) {
             message.writeByte(mask.intValue());
index 689b90b5253a2a9683c7519bfd1f3126368bb635..c5531c4047b839fc12791ced79950f8a81f50441 100644 (file)
@@ -77,13 +77,12 @@ public class NspCodecTest {
         assertFalse(buffer.isReadable());
     }
 
-
-    private NxExpMatchEntryValue createMatchEntryValue(final Long value, final Long mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(final Long value, final Long mask) {
         NspValues nspValues = new NspValuesBuilder().setNsp(value).setMask(mask).build();
         return new NspCaseValueBuilder().setNspValues(nspValues).build();
     }
 
-    private void writeBuffer(final ByteBuf message, final Long value, final Long mask) {
+    private static void writeBuffer(final ByteBuf message, final Long value, final Long mask) {
         message.writeInt(value.intValue());
         if (mask != null) {
             message.writeInt(mask.intValue());
index 7c57278ac6c0113374ee09eefebcb07965d4449a..3cd244ec0ba31e06c351330e5920747cb1405096 100644 (file)
@@ -5,7 +5,6 @@
  * 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.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -63,7 +62,7 @@ public class PktMarkCodecTest {
         assertEquals(2, result.getPktMarkValues().getPktMark().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final PktMarkCaseValueBuilder caseBuilder = new PktMarkCaseValueBuilder();
         final PktMarkValuesBuilder valuesBuilder = new PktMarkValuesBuilder();
@@ -79,7 +78,7 @@ public class PktMarkCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 4d0eb633d6983f2a197eb0523459528bcfdc4e42..2187024ab35469e698eed8ce96a3ceaafaa688a2 100644 (file)
@@ -64,7 +64,7 @@ public class Reg0CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -80,7 +80,7 @@ public class Reg0CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 74d8baf86fab5b7cfd2ca1947273e648e01fac6a..c3608ce459a620bee66ea4c7badd507348394f63 100644 (file)
@@ -64,7 +64,7 @@ public class Reg1CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -80,7 +80,7 @@ public class Reg1CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 318e1c7fe9ce2782a9a318d12ea7cd85e157a0a2..543722b2beb12c43261475e94b33e86c648f7821 100644 (file)
@@ -63,7 +63,7 @@ public class Reg2CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -79,7 +79,7 @@ public class Reg2CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 905b376cb9e0b6589464ad858fb0b72f08d6078e..d773b29abfddd615da949b202fc5ec43d63af2e3 100644 (file)
@@ -65,7 +65,7 @@ public class Reg3CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -81,7 +81,7 @@ public class Reg3CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index b14c72f44446583ccbd512948ec51cf4e567b7ff..dd7dac3b7c37a2fc660bce07ac9f44ec2296a477 100644 (file)
@@ -64,7 +64,7 @@ public class Reg4CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -80,7 +80,7 @@ public class Reg4CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 8bb2b1a2bfa848eb8f7d124cda5556d97531d6a6..a04535f86cd8d4ac2aa01dc7002d37b659e80db5 100644 (file)
@@ -65,7 +65,7 @@ public class Reg5CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -81,7 +81,7 @@ public class Reg5CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 339ea7da04448d0a9fe356a4dc93659f82ba5a10..2c9f143f1eece05f1d32d0306ee7e7ebcb6028f0 100644 (file)
@@ -64,7 +64,7 @@ public class Reg6CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -80,7 +80,7 @@ public class Reg6CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index ede553d574b9ef513428f369ed25afe3650e4345..58e23b30953a15e05c6992080da87884b772ba30 100644 (file)
@@ -64,7 +64,7 @@ public class Reg7CodecTest {
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final RegCaseValueBuilder caseBuilder = new RegCaseValueBuilder();
         final RegValuesBuilder valuesBuilder = new RegValuesBuilder();
@@ -80,7 +80,7 @@ public class Reg7CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 57dad4fba24d57ce30b6e9b739c358469d64df30..38c5f1b12778f7669ae41b4288aaa8b3cb09b4c1 100644 (file)
@@ -67,8 +67,7 @@ public class TcpDstCodecTest {
         assertEquals(0xffff, result.getTcpDstValues().getMask().shortValue() & 0xffff);
     }
 
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final TcpDstCaseValueBuilder caseBuilder = new TcpDstCaseValueBuilder();
         final TcpDstValuesBuilder valuesBuilder = new TcpDstValuesBuilder();
@@ -85,7 +84,7 @@ public class TcpDstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 230dbae0dbd108d7384016657dfa0ebe6e3845d3..c3f631c7f6fae514b3b1f849b7f9af40bbd9c80f 100644 (file)
@@ -67,7 +67,7 @@ public class TcpSrcCodecTest {
         assertEquals(0xffff, result.getTcpSrcValues().getMask().shortValue() & 0xffff);
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final TcpSrcCaseValueBuilder caseBuilder = new TcpSrcCaseValueBuilder();
         final TcpSrcValuesBuilder valuesBuilder = new TcpSrcValuesBuilder();
@@ -84,7 +84,7 @@ public class TcpSrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index b2ea700fbf8c29a085081a1bea7e50c44b93662d..6149e84f26da476ba4f26b6d68a173c76faef67b 100644 (file)
@@ -65,9 +65,7 @@ public class TunIdCodecTest {
         assertEquals(0, result.getTunIdValues().getValue().longValue());
     }
 
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final TunIdCaseValueBuilder caseBuilder = new TunIdCaseValueBuilder();
         final TunIdValuesBuilder valuesBuilder = new TunIdValuesBuilder();
@@ -84,7 +82,7 @@ public class TunIdCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index fd1220ceb4834c348f4f1cedce635c5eb0e2304f..b3b4bf5d31392406b729f2a708a25bb8448c23c5 100644 (file)
@@ -64,9 +64,7 @@ public class TunIpv4DstCodecTest {
         assertEquals(1, result.getTunIpv4DstValues().getValue().intValue());
     }
 
-
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final TunIpv4DstCaseValueBuilder caseBuilder = new TunIpv4DstCaseValueBuilder();
         final TunIpv4DstValuesBuilder valuesBuilder = new TunIpv4DstValuesBuilder();
@@ -82,7 +80,7 @@ public class TunIpv4DstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index c7f0fd7c85e1a1c7358f36b039f024820c514c19..c6224321f783cd50f110039013895a6e96884fec 100644 (file)
@@ -64,7 +64,7 @@ public class TunIpv4SrcCodecTest {
         assertEquals(1, result.getTunIpv4SrcValues().getValue().intValue());
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final TunIpv4SrcCaseValueBuilder caseBuilder = new TunIpv4SrcCaseValueBuilder();
         final TunIpv4SrcValuesBuilder valuesBuilder = new TunIpv4SrcValuesBuilder();
@@ -80,7 +80,7 @@ public class TunIpv4SrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 0ac9ac6c990af2694412696a4049dadd9c0a9efe..0a339b683dfaf601c39afa3c2160bcc7abeb0beb 100644 (file)
@@ -67,8 +67,7 @@ public class UdpDstCodecTest {
         assertEquals(0xffff, result.getUdpDstValues().getMask().shortValue() & 0xffff);
     }
 
-
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final UdpDstCaseValueBuilder caseBuilder = new UdpDstCaseValueBuilder();
         final UdpDstValuesBuilder valuesBuilder = new UdpDstValuesBuilder();
@@ -85,7 +84,7 @@ public class UdpDstCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 5a85cd31e2f12749571d2d0684afb7dbb2f8d705..27dbef972ee8aa86c7414deca0652720b8669271 100644 (file)
@@ -67,7 +67,7 @@ public class UdpSrcCodecTest {
         assertEquals(0xffff, result.getUdpSrcValues().getMask().shortValue() & 0xffff);
     }
 
-    private MatchEntry createMatchEntry() {
+    private static MatchEntry createMatchEntry() {
         MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
         final UdpSrcCaseValueBuilder caseBuilder = new UdpSrcCaseValueBuilder();
         final UdpSrcValuesBuilder valuesBuilder = new UdpSrcValuesBuilder();
@@ -84,7 +84,7 @@ public class UdpSrcCodecTest {
         return matchEntryBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_0_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;
index 68ab1b2d4d12cdae33fcd2992fcb3ef40a482849..13c735377a2b3a2a89189e458ab5dbe5e96092d3 100644 (file)
@@ -39,7 +39,6 @@ module opendaylight-flow-statistics {
     grouping flow-and-statistics-map-list {
         description "List of flow and statistics map";
         list flow-and-statistics-map-list {
-            key "flow-id";
             leaf flow-id {
                 type flow-id;
             }
index 2fa5775fce0ebb375c01b3c7357b2a49efcf4558..e6ad13e06e0f9206267bdef45161b49dfc9ef5fd 100755 (executable)
@@ -52,7 +52,7 @@ public class ExperimenterIdMeterSubTypeSerializerKey<T extends DataContainer> ex
         if (getClass() != obj.getClass()) {
             return false;
         }
-        ExperimenterIdMeterSubTypeSerializerKey other = (ExperimenterIdMeterSubTypeSerializerKey) obj;
+        ExperimenterIdMeterSubTypeSerializerKey<?> other = (ExperimenterIdMeterSubTypeSerializerKey<?>) obj;
         if (meterSubType == null) {
             if (other.meterSubType != null) {
                 return false;
index 376394a2f4ce03180b0a200bbc4ddc72dfe184ea..bba05c74948825eabf00c8b062e47bc6506c9df6 100644 (file)
@@ -5,7 +5,6 @@
  * 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.api.keys;
 
 import org.junit.Assert;
@@ -21,6 +20,8 @@ import org.opendaylight.yangtools.yang.common.Uint32;
  * @author michal.polkorab
  */
 public class ActionSerializerKeyTest {
+    private static final Uint32 FORTY_TWO = Uint32.valueOf(42);
+    private static final Uint32 FIFTY_FIVE = Uint32.valueOf(55);
 
     /**
      * Test ActionSerializerKey equals and hashCode.
@@ -28,9 +29,9 @@ public class ActionSerializerKeyTest {
     @Test
     public void test() {
         ActionSerializerKey<CopyTtlInCase> key1 =
-                new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, 42L);
+                new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, FORTY_TWO);
         ActionSerializerKey<?> key2 =
-                new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, 42L);
+                new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, FORTY_TWO);
         Assert.assertTrue("Wrong equals", key1.equals(key2));
         Assert.assertTrue("Wrong hashCode", key1.hashCode() == key2.hashCode());
         key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, (Uint32) null);
@@ -39,13 +40,13 @@ public class ActionSerializerKeyTest {
         key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, null, (Uint32) null);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashCode", key1.hashCode() == key2.hashCode());
-        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlOutCase.class, 42L);
+        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlOutCase.class, FORTY_TWO);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashCode", key1.hashCode() == key2.hashCode());
-        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, 55L);
+        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, CopyTtlInCase.class, FIFTY_FIVE);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashCode", key1.hashCode() == key2.hashCode());
-        key2 = new ActionSerializerKey<>(EncodeConstants.OF13_VERSION_ID, CopyTtlInCase.class, 55L);
+        key2 = new ActionSerializerKey<>(EncodeConstants.OF13_VERSION_ID, CopyTtlInCase.class, FIFTY_FIVE);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashCode", key1.hashCode() == key2.hashCode());
     }
@@ -55,14 +56,14 @@ public class ActionSerializerKeyTest {
      */
     @Test
     public void testEquals() {
-        ActionSerializerKey<?> key1 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, null, 42L);
+        ActionSerializerKey<?> key1 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, null, FORTY_TWO);
         ActionSerializerKey<?> key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
-                CopyTtlInCase.class, 42L);
+                CopyTtlInCase.class, FORTY_TWO);
 
         Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1));
         Assert.assertFalse("Wrong equal by actionType", key1.equals(key2));
 
-        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, null, 42L);
+        key2 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID, null, FORTY_TWO);
         Assert.assertTrue("Wrong equal by action type", key1.equals(key2));
         key1 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID,  CopyTtlInCase.class, (Uint32) null);
         Assert.assertFalse("Wrong equal by experimenterId", key1.equals(key2));
@@ -76,7 +77,7 @@ public class ActionSerializerKeyTest {
     @Test
     public void testToString() {
         ActionSerializerKey<CopyTtlInCase> key1 = new ActionSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
-                CopyTtlInCase.class, 42L);
+                CopyTtlInCase.class, FORTY_TWO);
 
         Assert.assertEquals("Wrong toString()", "msgVersion: 1 objectType: org.opendaylight.yang.gen.v1.urn"
                 + ".opendaylight.openflow.common.action.rev150203.actions.grouping.Action action type:"
index 0e393fbb0b22ec2e07e5d086e14af1827f7635ca..350a91a5bc7ff27e321d8fb9571e8ae8d7bd6ae4 100644 (file)
@@ -15,6 +15,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.ExperimenterActionSubType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.InPort;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.OpenflowBasicClass;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 /**
  * Unit tests for keys.
@@ -57,9 +58,9 @@ public class KeysTest {
     @Test
     public void testEqualsAndHashcodeOfActionDeserializerKeys() {
         ActionSerializerKey<ExperimenterIdCase> actionSerializerKey = new ActionSerializerKey<>(
-                EncodeConstants.OF13_VERSION_ID, ExperimenterIdCase.class, 1L);
+                EncodeConstants.OF13_VERSION_ID, ExperimenterIdCase.class, Uint32.ONE);
         ExperimenterActionSerializerKey experimenterActionSerializerKey = new ExperimenterActionSerializerKey(
-                EncodeConstants.OF13_VERSION_ID, 1L, ExpSubType.class);
+                EncodeConstants.OF13_VERSION_ID,  Uint32.ONE, ExpSubType.class);
         Assert.assertFalse(actionSerializerKey.equals(experimenterActionSerializerKey));
         Assert.assertFalse(experimenterActionSerializerKey.equals(actionSerializerKey));
 
index b4464f6dc3198b29b69be6f4d6932c06082814de..734625c00c5d8b29577c9d9f44a3a98b24a4209c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.api.keys.experimenter;
 
 import org.junit.Assert;
@@ -21,6 +20,8 @@ import org.opendaylight.yangtools.yang.common.Uint32;
  * @author michal.polkorab
  */
 public class ExperimenterActionSerializerKeyTest {
+    private static final Uint32 FORTY_TWO = Uint32.valueOf(42);
+    private static final Uint32 FIFTY_FIVE = Uint32.valueOf(55);
 
     /**
      * Test ExperimenterActionSerializerKey equals and hashCode.
@@ -28,24 +29,24 @@ public class ExperimenterActionSerializerKeyTest {
     @Test
     public void test() {
         ExperimenterActionSerializerKey key1 =
-                new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L, TestSubType.class);
+                new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FORTY_TWO, TestSubType.class);
         ExperimenterActionSerializerKey key2 =
-                new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L, TestSubType.class);
+                new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FORTY_TWO, TestSubType.class);
         Assert.assertTrue("Wrong equals", key1.equals(key2));
         Assert.assertTrue("Wrong hashcode", key1.hashCode() == key2.hashCode());
-        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF13_VERSION_ID, 42L, TestSubType.class);
+        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF13_VERSION_ID, FORTY_TWO, TestSubType.class);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode());
         key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, (Uint32) null, TestSubType.class);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode());
-        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 55L, TestSubType.class);
+        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FIFTY_FIVE, TestSubType.class);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode());
-        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 55L, null);
+        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FIFTY_FIVE, null);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode());
-        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 55L, TestSubType2.class);
+        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FIFTY_FIVE, TestSubType2.class);
         Assert.assertFalse("Wrong equals", key1.equals(key2));
         Assert.assertFalse("Wrong hashcode", key1.hashCode() == key2.hashCode());
     }
@@ -57,11 +58,11 @@ public class ExperimenterActionSerializerKeyTest {
     public void testEquals() {
         ExperimenterActionSerializerKey key1;
         ExperimenterActionSerializerKey key2;
-        key1 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L, null);
+        key1 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FORTY_TWO, null);
         Assert.assertTrue("Wrong equal to identical object.", key1.equals(key1));
-        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L, TestSubType2.class);
+        key2 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FORTY_TWO, TestSubType2.class);
         Assert.assertFalse("Wrong equal by actionSubType.", key1.equals(key2));
-        key1 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L, TestSubType.class);
+        key1 = new ExperimenterActionSerializerKey(EncodeConstants.OF10_VERSION_ID, FORTY_TWO, TestSubType.class);
         Assert.assertFalse("Wrong equal by actionSubType.", key1.equals(key2));
     }
 
@@ -73,6 +74,4 @@ public class ExperimenterActionSerializerKeyTest {
     private interface TestSubType2 extends ExperimenterActionSubType {
         // empty class - only used in test for comparation
     }
-
-
 }
index 420c59e374bad57f87b587187fb2ab3ed0028679..afd5d48659fbf74c5382abe45f35028bc9043fed 100644 (file)
@@ -65,9 +65,9 @@ public class OFFrameDecoder extends ByteToMessageDecoder {
         }
     }
 
-    private String getSslErrorCause(Throwable cause) {
+    private static String getSslErrorCause(Throwable cause) {
         String sslError = null;
-        while ((cause != null) && (cause.getCause() != null)) {
+        while (cause != null && cause.getCause() != null) {
             sslError = cause.getCause().getMessage();
             cause = cause.getCause();
         }
index 84a5cfda9843c9b2a2671510d27e59ab9b5dfa40..2e760edfa31b46ccff9e57d50aadf1611cb49bbc 100644 (file)
@@ -304,7 +304,7 @@ public class MultipartRequestInputMessageFactory
         return new TableConfig(deprecated);
     }
 
-    private MultipartRequestDescCase setDesc(ByteBuf input) {
+    private static MultipartRequestDescCase setDesc(ByteBuf input) {
         MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
         MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
         descBuilder.setEmpty(Empty.getInstance());
@@ -354,7 +354,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestPortDescCase setPortDesc(ByteBuf input) {
+    private static MultipartRequestPortDescCase setPortDesc(ByteBuf input) {
         MultipartRequestPortDescCaseBuilder caseBuilder = new MultipartRequestPortDescCaseBuilder();
         MultipartRequestPortDescBuilder portBuilder = new MultipartRequestPortDescBuilder();
         portBuilder.setEmpty(Empty.getInstance());
@@ -362,7 +362,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestPortStatsCase setPortStats(ByteBuf input) {
+    private static MultipartRequestPortStatsCase setPortStats(ByteBuf input) {
         MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
         MultipartRequestPortStatsBuilder portBuilder = new MultipartRequestPortStatsBuilder();
         portBuilder.setPortNo(input.readUnsignedInt());
@@ -370,7 +370,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestQueueCase setQueue(ByteBuf input) {
+    private static MultipartRequestQueueCase setQueue(ByteBuf input) {
         MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
         MultipartRequestQueueBuilder queueBuilder = new MultipartRequestQueueBuilder();
         queueBuilder.setPortNo(input.readUnsignedInt());
@@ -379,7 +379,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestGroupCase setGroup(ByteBuf input) {
+    private static MultipartRequestGroupCase setGroup(ByteBuf input) {
         MultipartRequestGroupCaseBuilder caseBuilder = new MultipartRequestGroupCaseBuilder();
         MultipartRequestGroupBuilder groupBuilder = new MultipartRequestGroupBuilder();
         groupBuilder.setGroupId(new GroupId(input.readUnsignedInt()));
@@ -387,7 +387,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestGroupDescCase setGroupDesc(ByteBuf input) {
+    private static MultipartRequestGroupDescCase setGroupDesc(ByteBuf input) {
         MultipartRequestGroupDescCaseBuilder caseBuilder = new MultipartRequestGroupDescCaseBuilder();
         MultipartRequestGroupDescBuilder groupBuilder = new MultipartRequestGroupDescBuilder();
         groupBuilder.setEmpty(Empty.getInstance());
@@ -395,7 +395,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestGroupFeaturesCase setGroupFeatures(ByteBuf input) {
+    private static MultipartRequestGroupFeaturesCase setGroupFeatures(ByteBuf input) {
         MultipartRequestGroupFeaturesCaseBuilder caseBuilder = new MultipartRequestGroupFeaturesCaseBuilder();
         MultipartRequestGroupFeaturesBuilder groupBuilder = new MultipartRequestGroupFeaturesBuilder();
         groupBuilder.setEmpty(Empty.getInstance());
@@ -403,7 +403,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestMeterCase setMeter(ByteBuf input) {
+    private static MultipartRequestMeterCase setMeter(ByteBuf input) {
         MultipartRequestMeterCaseBuilder caseBuilder = new MultipartRequestMeterCaseBuilder();
         MultipartRequestMeterBuilder meterBuilder = new MultipartRequestMeterBuilder();
         meterBuilder.setMeterId(new MeterId(input.readUnsignedInt()));
@@ -411,7 +411,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestMeterConfigCase setMeterConfig(ByteBuf input) {
+    private static MultipartRequestMeterConfigCase setMeterConfig(ByteBuf input) {
         MultipartRequestMeterConfigCaseBuilder caseBuilder = new MultipartRequestMeterConfigCaseBuilder();
         MultipartRequestMeterConfigBuilder meterBuilder = new MultipartRequestMeterConfigBuilder();
         meterBuilder.setMeterId(new MeterId(input.readUnsignedInt()));
@@ -419,7 +419,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestMeterFeaturesCase setMeterFeatures(ByteBuf input) {
+    private static MultipartRequestMeterFeaturesCase setMeterFeatures(ByteBuf input) {
         MultipartRequestMeterFeaturesCaseBuilder caseBuilder = new MultipartRequestMeterFeaturesCaseBuilder();
         MultipartRequestMeterFeaturesBuilder meterBuilder = new MultipartRequestMeterFeaturesBuilder();
         meterBuilder.setEmpty(Empty.getInstance());
@@ -427,7 +427,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestTableCase setTable(ByteBuf input) {
+    private static MultipartRequestTableCase setTable(ByteBuf input) {
         MultipartRequestTableCaseBuilder caseBuilder = new MultipartRequestTableCaseBuilder();
         MultipartRequestTableBuilder tableBuilder = new MultipartRequestTableBuilder();
         tableBuilder.setEmpty(Empty.getInstance());
@@ -435,7 +435,7 @@ public class MultipartRequestInputMessageFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
+    private static MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
         MultipartRequestExperimenterCaseBuilder caseBuilder = new MultipartRequestExperimenterCaseBuilder();
         MultipartRequestExperimenterBuilder experimenterBuilder = new MultipartRequestExperimenterBuilder();
         caseBuilder.setMultipartRequestExperimenter(experimenterBuilder.build());
index 6d5b76e2379ae942d14e73750a48e0cc614ba25e..f59e5423715646c1432e818b6b633225239aed8a 100644 (file)
@@ -93,14 +93,14 @@ public class OF10StatsRequestInputFactory
         return builder.build();
     }
 
-    private MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
+    private static MultipartRequestExperimenterCase setExperimenter(ByteBuf input) {
         MultipartRequestExperimenterCaseBuilder caseBuilder = new MultipartRequestExperimenterCaseBuilder();
         MultipartRequestExperimenterBuilder experimenterBuilder = new MultipartRequestExperimenterBuilder();
         caseBuilder.setMultipartRequestExperimenter(experimenterBuilder.build());
         return caseBuilder.build();
     }
 
-    private MultipartRequestQueueCase setQueue(ByteBuf input) {
+    private static MultipartRequestQueueCase setQueue(ByteBuf input) {
         final MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
         MultipartRequestQueueBuilder queueBuilder = new MultipartRequestQueueBuilder();
         queueBuilder.setPortNo((long) input.readUnsignedShort());
@@ -110,7 +110,7 @@ public class OF10StatsRequestInputFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestPortStatsCase setPortStats(ByteBuf input) {
+    private static MultipartRequestPortStatsCase setPortStats(ByteBuf input) {
         MultipartRequestPortStatsCaseBuilder caseBuilder = new MultipartRequestPortStatsCaseBuilder();
         MultipartRequestPortStatsBuilder portBuilder = new MultipartRequestPortStatsBuilder();
         portBuilder.setPortNo((long) input.readUnsignedShort());
@@ -118,7 +118,7 @@ public class OF10StatsRequestInputFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestTableCase setTable(ByteBuf input) {
+    private static MultipartRequestTableCase setTable(ByteBuf input) {
         MultipartRequestTableCaseBuilder caseBuilder = new MultipartRequestTableCaseBuilder();
         MultipartRequestTableBuilder tableBuilder = new MultipartRequestTableBuilder();
         tableBuilder.setEmpty(Empty.getInstance());
@@ -152,7 +152,7 @@ public class OF10StatsRequestInputFactory
         return caseBuilder.build();
     }
 
-    private MultipartRequestDescCase setDesc(ByteBuf input) {
+    private static MultipartRequestDescCase setDesc(ByteBuf input) {
         MultipartRequestDescCaseBuilder caseBuilder = new MultipartRequestDescCaseBuilder();
         MultipartRequestDescBuilder descBuilder = new MultipartRequestDescBuilder();
         descBuilder.setEmpty(Empty.getInstance());
index fe7f8ed382e622f95eb12a250a9c3e2799d43bb7..fc4d993a2fba0e1525c2d213771baa112df5ae0c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.serialization.action;
 
 import io.netty.buffer.ByteBuf;
@@ -24,7 +23,7 @@ public class OF10SetDlDstActionSerializer extends AbstractActionSerializer {
     @Override
     public void serialize(final Action action, final ByteBuf outBuffer) {
         super.serialize(action, outBuffer);
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(((SetDlDstCase) action.getActionChoice())
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(((SetDlDstCase) action.getActionChoice())
                 .getSetDlDstAction().getDlDstAddress()));
         outBuffer.writeZero(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);
     }
index 919572c878568488cb4089367cd51a52ed0a9d64..a9bf2256a024c5e496d2e46563d45c9e595a9efb 100644 (file)
@@ -5,7 +5,6 @@
  * 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.serialization.action;
 
 import io.netty.buffer.ByteBuf;
@@ -24,7 +23,7 @@ public class OF10SetDlSrcActionSerializer extends AbstractActionSerializer {
     @Override
     public void serialize(final Action action, final ByteBuf outBuffer) {
         super.serialize(action, outBuffer);
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(((SetDlSrcCase) action.getActionChoice())
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(((SetDlSrcCase) action.getActionChoice())
                 .getSetDlSrcAction().getDlSrcAddress()));
         outBuffer.writeZero(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);
     }
@@ -38,5 +37,4 @@ public class OF10SetDlSrcActionSerializer extends AbstractActionSerializer {
     protected int getLength() {
         return ActionConstants.LARGER_ACTION_LENGTH;
     }
-
 }
index cac8fa94787f55bedd63ce89e46046f6d21cfa02..78496ea656f5bfc11f8a3fd879938b87d9d2b201 100644 (file)
@@ -221,7 +221,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         // TODO: experimenterBody does not have get methods
     }
 
-    private void writeFlags(final MultipartRequestFlags flags, final ByteBuf outBuffer) {
+    private static void writeFlags(final MultipartRequestFlags flags, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, flags.isOFPMPFREQMORE());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
@@ -387,14 +387,14 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         return result;
     }
 
-    private void writeTableConfig(final TableConfig tableConfig, final ByteBuf outBuffer) {
+    private static void writeTableConfig(final TableConfig tableConfig, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, tableConfig.isOFPTCDEPRECATEDMASK());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeInt(bitmap);
     }
 
-    private void serializeMeterFeaturesBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeMeterFeaturesBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyMeterFeaturesCase meterFeaturesCase = (MultipartReplyMeterFeaturesCase) body;
         MultipartReplyMeterFeatures meterFeatures = meterFeaturesCase.getMultipartReplyMeterFeatures();
         outBuffer.writeInt(meterFeatures.getMaxMeter().intValue());
@@ -405,7 +405,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeZero(METER_FEATURES_PADDING);
     }
 
-    private void writeBandTypes(final MeterBandTypeBitmap bandTypes, final ByteBuf outBuffer) {
+    private static void writeBandTypes(final MeterBandTypeBitmap bandTypes, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, bandTypes.isOFPMBTDROP());
         map.put(1, bandTypes.isOFPMBTDSCPREMARK());
@@ -413,7 +413,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void serializeMeterConfigBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeMeterConfigBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyMeterConfigCase meterConfigCase = (MultipartReplyMeterConfigCase) body;
         MultipartReplyMeterConfig meter = meterConfigCase.getMultipartReplyMeterConfig();
         for (MeterConfig meterConfig : meter.getMeterConfig()) {
@@ -449,7 +449,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(meterBand.getBurstSize().intValue());
     }
 
-    private void writeMeterFlags(final MeterFlags flags, final ByteBuf outBuffer) {
+    private static void writeMeterFlags(final MeterFlags flags, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, flags.isOFPMFKBPS());
         map.put(1, flags.isOFPMFPKTPS());
@@ -459,7 +459,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeShort(bitmap);
     }
 
-    private void serializeMeterBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeMeterBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyMeterCase meterCase = (MultipartReplyMeterCase) body;
         MultipartReplyMeter meter = meterCase.getMultipartReplyMeter();
         for (MeterStats meterStats : meter.getMeterStats()) {
@@ -481,7 +481,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeGroupFeaturesBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeGroupFeaturesBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyGroupFeaturesCase groupFeaturesCase = (MultipartReplyGroupFeaturesCase) body;
         MultipartReplyGroupFeatures groupFeatures = groupFeaturesCase.getMultipartReplyGroupFeatures();
         writeGroupTypes(groupFeatures.getTypes(), outBuffer);
@@ -494,7 +494,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void writeActionType(final ActionType action, final ByteBuf outBuffer) {
+    private static void writeActionType(final ActionType action, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, action.isOFPATOUTPUT());
         map.put(1, action.isOFPATCOPYTTLOUT());
@@ -517,7 +517,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void writeGroupCapabilities(final GroupCapabilities capabilities, final ByteBuf outBuffer) {
+    private static void writeGroupCapabilities(final GroupCapabilities capabilities, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, capabilities.isOFPGFCSELECTWEIGHT());
         map.put(1, capabilities.isOFPGFCSELECTLIVENESS());
@@ -527,7 +527,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void writeGroupTypes(final GroupTypes types, final ByteBuf outBuffer) {
+    private static void writeGroupTypes(final GroupTypes types, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, types.isOFPGTALL());
         map.put(1, types.isOFPGTSELECT());
@@ -564,7 +564,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeGroupBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeGroupBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyGroupCase groupCase = (MultipartReplyGroupCase) body;
         MultipartReplyGroup group = groupCase.getMultipartReplyGroup();
         for (GroupStats groupStats : group.getGroupStats()) {
@@ -587,7 +587,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeQueueBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeQueueBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyQueueCase queueCase = (MultipartReplyQueueCase) body;
         MultipartReplyQueue queue = queueCase.getMultipartReplyQueue();
         for (QueueStats queueStats : queue.getQueueStats()) {
@@ -601,7 +601,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializePortStatsBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializePortStatsBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyPortStatsCase portStatsCase = (MultipartReplyPortStatsCase) body;
         MultipartReplyPortStats portStats = portStatsCase.getMultipartReplyPortStats();
         for (PortStats portStat : portStats.getPortStats()) {
@@ -624,7 +624,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeTableBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeTableBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyTableCase tableCase = (MultipartReplyTableCase) body;
         MultipartReplyTable table = tableCase.getMultipartReplyTable();
         for (TableStats tableStats : table.getTableStats()) {
@@ -636,7 +636,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeAggregateBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeAggregateBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyAggregateCase aggregateCase = (MultipartReplyAggregateCase) body;
         MultipartReplyAggregate aggregate = aggregateCase.getMultipartReplyAggregate();
         outBuffer.writeLong(aggregate.getPacketCount().longValue());
@@ -675,7 +675,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeDescBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializeDescBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyDescCase descCase = (MultipartReplyDescCase) body;
         MultipartReplyDesc desc = descCase.getMultipartReplyDesc();
         write256String(desc.getMfrDesc(), outBuffer);
@@ -685,7 +685,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         write256String(desc.getDpDesc(), outBuffer);
     }
 
-    private void write256String(final String toWrite, final ByteBuf outBuffer) {
+    private static void write256String(final String toWrite, final ByteBuf outBuffer) {
         byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 256) {
             byte[] nameBytesPadding = new byte[256];
@@ -703,7 +703,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void write32String(final String toWrite, final ByteBuf outBuffer) {
+    private static void write32String(final String toWrite, final ByteBuf outBuffer) {
         byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 32) {
             byte[] nameBytesPadding = new byte[32];
@@ -721,14 +721,14 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializePortDescBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
+    private static void serializePortDescBody(final MultipartReplyBody body, final ByteBuf outBuffer) {
         MultipartReplyPortDescCase portCase = (MultipartReplyPortDescCase) body;
         MultipartReplyPortDesc portDesc = portCase.getMultipartReplyPortDesc();
         for (Ports port : portDesc.getPorts()) {
             outBuffer.writeInt(port.getPortNo().intValue()); // Assuming PortNo
                                                              // = PortId
             outBuffer.writeZero(PORT_DESC_PADDING_1);
-            outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(port.getHwAddr()));
+            outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(port.getHwAddr()));
             outBuffer.writeZero(PORT_DESC_PADDING_2);
             writeName(port.getName(), outBuffer);
             writePortConfig(port.getConfig(), outBuffer);
@@ -742,7 +742,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void writeName(final String name, final ByteBuf outBuffer) {
+    private static void writeName(final String name, final ByteBuf outBuffer) {
         byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 16) {
             byte[] nameBytesPadding = new byte[16];
@@ -758,10 +758,9 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         } else {
             outBuffer.writeBytes(nameBytes);
         }
-
     }
 
-    private void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
+    private static void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, config.isPortDown());
         map.put(2, config.isNoRecv());
@@ -771,7 +770,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortState(final PortState state, final ByteBuf outBuffer) {
+    private static void writePortState(final PortState state, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, state.isLinkDown());
         map.put(1, state.isBlocked());
@@ -780,7 +779,7 @@ public class MultipartReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
+    private static void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, features.is_10mbHd());
         map.put(1, features.is_10mbFd());
index d5934b0c1d2f571fe7d47b20dfae3b352b65618e..15563a92b7e8ab787db29541816d2edcc7187c49 100644 (file)
@@ -44,7 +44,7 @@ public class OF10FeaturesReplyMessageFactory implements OFSerializer<GetFeatures
         outBuffer.writeInt(createActionsV10(message.getActionsV10()));
         for (PhyPort port : message.getPhyPort()) {
             outBuffer.writeShort(port.getPortNo().intValue());
-            outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(port.getHwAddr()));
+            outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(port.getHwAddr()));
             writeName(port.getName(), outBuffer);
             writePortConfig(port.getConfigV10(), outBuffer);
             writePortState(port.getStateV10(), outBuffer);
@@ -56,7 +56,7 @@ public class OF10FeaturesReplyMessageFactory implements OFSerializer<GetFeatures
         ByteBufUtils.updateOFHeaderLength(outBuffer);
     }
 
-    private void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
+    private static void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, feature.is_10mbHd());
         map.put(1, feature.is_10mbFd());
@@ -74,7 +74,7 @@ public class OF10FeaturesReplyMessageFactory implements OFSerializer<GetFeatures
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
+    private static void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, state.isLinkDown());
         map.put(1, state.isBlocked());
@@ -88,7 +88,7 @@ public class OF10FeaturesReplyMessageFactory implements OFSerializer<GetFeatures
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
+    private static void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, config.isPortDown());
         map.put(1, config.isNoStp());
@@ -123,7 +123,7 @@ public class OF10FeaturesReplyMessageFactory implements OFSerializer<GetFeatures
 
     }
 
-    private void writeName(final String name, final ByteBuf outBuffer) {
+    private static void writeName(final String name, final ByteBuf outBuffer) {
         byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 16) {
             byte[] nameBytesPadding = new byte[16];
index 318d7f6c3266b6714c5cc5c598dde73c4d382bb4..aa794205e2b4bd9362c46cd8a4d67706c323c410 100644 (file)
@@ -5,7 +5,6 @@
  * 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.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
@@ -31,7 +30,7 @@ public class OF10PortModInputMessageFactory implements OFSerializer<PortModInput
     public void serialize(final PortModInput message, final ByteBuf outBuffer) {
         ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);
         outBuffer.writeShort(message.getPortNo().getValue().intValue());
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(message.getHwAddress()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(message.getHwAddress()));
         outBuffer.writeInt(createPortConfigBitmask(message.getConfigV10()));
         outBuffer.writeInt(createPortConfigBitmask(message.getMaskV10()));
         outBuffer.writeInt(createPortFeaturesBitmask(message.getAdvertiseV10()));
index 5d7de896b5245150a40243d6cc9038c8742c9b60..9aa1778a4f55b93ea8a54dc674624eede7dd38e8 100644 (file)
@@ -36,7 +36,7 @@ public class OF10PortStatusMessageFactory implements OFSerializer<PortStatusMess
         outBuffer.writeByte(message.getReason().getIntValue());
         outBuffer.writeZero(PADDING);
         outBuffer.writeShort(message.getPortNo().intValue());
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(message.getHwAddr()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(message.getHwAddr()));
         writeName(message.getName(), outBuffer);
         writePortConfig(message.getConfigV10(), outBuffer);
         writePortState(message.getStateV10(), outBuffer);
@@ -47,7 +47,7 @@ public class OF10PortStatusMessageFactory implements OFSerializer<PortStatusMess
         ByteBufUtils.updateOFHeaderLength(outBuffer);
     }
 
-    private void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
+    private static void writePortFeature(final PortFeaturesV10 feature, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, feature.is_10mbHd());
         map.put(1, feature.is_10mbFd());
@@ -65,7 +65,7 @@ public class OF10PortStatusMessageFactory implements OFSerializer<PortStatusMess
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
+    private static void writePortState(final PortStateV10 state, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, state.isLinkDown());
         map.put(1, state.isBlocked());
@@ -79,7 +79,7 @@ public class OF10PortStatusMessageFactory implements OFSerializer<PortStatusMess
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
+    private static void writePortConfig(final PortConfigV10 config, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, config.isPortDown());
         map.put(1, config.isNoStp());
@@ -92,7 +92,7 @@ public class OF10PortStatusMessageFactory implements OFSerializer<PortStatusMess
         outBuffer.writeInt(bitmap);
     }
 
-    private void writeName(final String name, final ByteBuf outBuffer) {
+    private static void writeName(final String name, final ByteBuf outBuffer) {
         byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 16) {
             byte[] nameBytesPadding = new byte[16];
index 9343a71b4c2e3518e65690d256de012914d72f12..c2247506aa6af6d920e3a15fdb5543277d2f4eaa 100644 (file)
@@ -113,7 +113,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         // TODO: experimenterBody does not have get methods
     }
 
-    private void serializeQueueBody(MultipartReplyBody body, ByteBuf outBuffer) {
+    private static void serializeQueueBody(MultipartReplyBody body, ByteBuf outBuffer) {
         MultipartReplyQueueCase queueCase = (MultipartReplyQueueCase) body;
         MultipartReplyQueue queue = queueCase.getMultipartReplyQueue();
         for (QueueStats queueStats : queue.getQueueStats()) {
@@ -129,7 +129,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializePortStatsBody(MultipartReplyBody body, ByteBuf outBuffer) {
+    private static void serializePortStatsBody(MultipartReplyBody body, ByteBuf outBuffer) {
         MultipartReplyPortStatsCase portStatsCase = (MultipartReplyPortStatsCase) body;
         MultipartReplyPortStats portStats = portStatsCase.getMultipartReplyPortStats();
         for (PortStats portStat : portStats.getPortStats()) {
@@ -150,7 +150,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void serializeTableBody(MultipartReplyBody body, ByteBuf outBuffer) {
+    private static void serializeTableBody(MultipartReplyBody body, ByteBuf outBuffer) {
         MultipartReplyTableCase tableCase = (MultipartReplyTableCase) body;
         MultipartReplyTable table = tableCase.getMultipartReplyTable();
         for (TableStats tableStats : table.getTableStats()) {
@@ -165,7 +165,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void writeFlowWildcardsV10(FlowWildcardsV10 feature, ByteBuf outBuffer) {
+    private static void writeFlowWildcardsV10(FlowWildcardsV10 feature, ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, feature.isINPORT());
         map.put(1, feature.isDLVLAN());
@@ -181,7 +181,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         outBuffer.writeInt(bitmap);
     }
 
-    private void serializeAggregateBody(MultipartReplyBody body, ByteBuf outBuffer) {
+    private static void serializeAggregateBody(MultipartReplyBody body, ByteBuf outBuffer) {
         MultipartReplyAggregateCase aggregateCase = (MultipartReplyAggregateCase) body;
         MultipartReplyAggregate aggregate = aggregateCase.getMultipartReplyAggregate();
         outBuffer.writeLong(aggregate.getPacketCount().longValue());
@@ -216,14 +216,14 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void writeFlags(MultipartRequestFlags flags, ByteBuf outBuffer) {
+    private static void writeFlags(MultipartRequestFlags flags, ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, flags.isOFPMPFREQMORE());
         int bitmap = ByteBufUtils.fillBitMaskFromMap(map);
         outBuffer.writeShort(bitmap);
     }
 
-    private void serializeDescBody(MultipartReplyBody body, ByteBuf outBuffer) {
+    private static void serializeDescBody(MultipartReplyBody body, ByteBuf outBuffer) {
         MultipartReplyDescCase descCase = (MultipartReplyDescCase) body;
         MultipartReplyDesc desc = descCase.getMultipartReplyDesc();
         write256String(desc.getMfrDesc(), outBuffer);
@@ -233,7 +233,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         write256String(desc.getDpDesc(), outBuffer);
     }
 
-    private void write256String(String toWrite, ByteBuf outBuffer) {
+    private static void write256String(String toWrite, ByteBuf outBuffer) {
         byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 256) {
             byte[] nameBytesPadding = new byte[256];
@@ -251,7 +251,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void write16String(String toWrite, ByteBuf outBuffer) {
+    private static void write16String(String toWrite, ByteBuf outBuffer) {
         byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 16) {
             byte[] nameBytesPadding = new byte[16];
@@ -269,7 +269,7 @@ public class OF10StatsReplyMessageFactory implements OFSerializer<MultipartReply
         }
     }
 
-    private void write32String(String toWrite, ByteBuf outBuffer) {
+    private static void write32String(String toWrite, ByteBuf outBuffer) {
         byte[] nameBytes = toWrite.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 32) {
             byte[] nameBytesPadding = new byte[32];
index 2fa0ad3b8091eced34f2f876892fde1513b8d50d..563bd51e0cdf20af7c1254f8a2f7f68f3372e7c5 100644 (file)
@@ -5,7 +5,6 @@
  * 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.serialization.factories;
 
 import io.netty.buffer.ByteBuf;
@@ -37,7 +36,7 @@ public class PortModInputMessageFactory implements OFSerializer<PortMod> {
         ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);
         outBuffer.writeInt(message.getPortNo().getValue().intValue());
         outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_01);
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(message.getHwAddress()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(message.getHwAddress()));
         outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_02);
         outBuffer.writeInt(createPortConfigBitmask(message.getConfig()));
         outBuffer.writeInt(createPortConfigBitmask(message.getMask()));
index ba6df1e78d7a5cb6ac01e3c7f153b494fecdf263..0035b9191b84143bd96e96d2aa7b6b54f13803ab 100644 (file)
@@ -39,7 +39,7 @@ public class PortStatusMessageFactory implements OFSerializer<PortStatusMessage>
         outBuffer.writeZero(PADDING);
         outBuffer.writeInt(message.getPortNo().intValue());
         outBuffer.writeZero(PORT_PADDING_1);
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(message.getHwAddr()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(message.getHwAddr()));
         outBuffer.writeZero(PORT_PADDING_2);
         writeName(message.getName(), outBuffer);
         writePortConfig(message.getConfig(), outBuffer);
@@ -53,7 +53,7 @@ public class PortStatusMessageFactory implements OFSerializer<PortStatusMessage>
         ByteBufUtils.updateOFHeaderLength(outBuffer);
     }
 
-    private void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
+    private static void writePortConfig(final PortConfig config, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, config.isPortDown());
         map.put(2, config.isNoRecv());
@@ -63,7 +63,7 @@ public class PortStatusMessageFactory implements OFSerializer<PortStatusMessage>
         outBuffer.writeInt(bitmap);
     }
 
-    private void writeName(final String name, final ByteBuf outBuffer) {
+    private static void writeName(final String name, final ByteBuf outBuffer) {
         byte[] nameBytes = name.getBytes(StandardCharsets.UTF_8);
         if (nameBytes.length < 16) {
             byte[] nameBytesPadding = new byte[16];
@@ -79,10 +79,9 @@ public class PortStatusMessageFactory implements OFSerializer<PortStatusMessage>
         } else {
             outBuffer.writeBytes(nameBytes);
         }
-
     }
 
-    private void writePortState(final PortState state, final ByteBuf outBuffer) {
+    private static void writePortState(final PortState state, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, state.isLinkDown());
         map.put(1, state.isBlocked());
@@ -91,7 +90,7 @@ public class PortStatusMessageFactory implements OFSerializer<PortStatusMessage>
         outBuffer.writeInt(bitmap);
     }
 
-    private void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
+    private static void writePortFeatures(final PortFeatures features, final ByteBuf outBuffer) {
         Map<Integer, Boolean> map = new HashMap<>();
         map.put(0, features.is_10mbHd());
         map.put(1, features.is_10mbFd());
index ec4a5dd408e7958336fa82e38f378c9257f68533..823f28eddd735e98373d21b57921794b91dfa58e 100644 (file)
@@ -73,12 +73,12 @@ public class QueueGetConfigReplyMessageFactory implements OFSerializer<GetQueueC
         ByteBufUtils.updateOFHeaderLength(outBuffer);
     }
 
-    private void serializeRateBody(RateQueueProperty body, ByteBuf outBuffer) {
+    private static void serializeRateBody(RateQueueProperty body, ByteBuf outBuffer) {
         outBuffer.writeShort(body.getRate().toJava());
         outBuffer.writeZero(PROPERTY_RATE_PADDING);
     }
 
-    private void serializeExperimenterBody(ExperimenterIdQueueProperty body, ByteBuf outBuffer) {
+    private static void serializeExperimenterBody(ExperimenterIdQueueProperty body, ByteBuf outBuffer) {
         // TODO: Experimenter Data is vendor specific that should implement its
         // own serializer
         outBuffer.writeInt(body.getExperimenter().getValue().intValue());
index 668cf42c410bde75f6748bcaf66ef3c74c11474b..4dcd0e2b322e50bdd751d1bd1bbdf5aa6ad18ea6 100644 (file)
@@ -19,6 +19,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
 public abstract class AbstractOxmMacAddressSerializer extends AbstractOxmMatchEntrySerializer {
 
     protected void writeMacAddress(final MacAddress address, final ByteBuf outBuffer) {
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(address)); // 48 b + mask [OF 1.3.2 spec]
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(address)); // 48 b + mask [OF 1.3.2 spec]
     }
 }
index a704dfdef786c21487142f5d44946693c96fe462..98816686dc25cfa84270c5c3ac38dbad2400e150 100644 (file)
@@ -5,7 +5,6 @@
  * 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.util;
 
 import io.netty.buffer.ByteBuf;
@@ -22,7 +21,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
  * @author michal.polkorab
  */
 public class OF10MatchSerializer implements OFSerializer<MatchV10> {
-
     private static final byte PADDING_IN_MATCH = 1;
     private static final byte PADDING_IN_MATCH_2 = 2;
     private static final byte NW_SRC_SHIFT = 8;
@@ -39,8 +37,8 @@ public class OF10MatchSerializer implements OFSerializer<MatchV10> {
         outBuffer.writeInt(encodeWildcards(match.getWildcards(), match.getNwSrcMask().toJava(),
                     match.getNwDstMask().toJava()));
         outBuffer.writeShort(match.getInPort().toJava());
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(match.getDlSrc()));
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(match.getDlDst()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(match.getDlSrc()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(match.getDlDst()));
         outBuffer.writeShort(match.getDlVlan().toJava());
         outBuffer.writeByte(match.getDlVlanPcp().toJava());
         outBuffer.writeZero(PADDING_IN_MATCH);
index a32bd28bb538eb4d78457bbe036eb30ea993337f..6e554781309793d90cfc45c77338aa97d18228ec 100644 (file)
@@ -96,7 +96,7 @@ public class FlowModInputMessageFactoryTest {
 
     }
 
-    private List<Instruction> createInstructions() {
+    private static List<Instruction> createInstructions() {
         final List<Instruction> instructions = new ArrayList<>();
         InstructionBuilder insBuilder = new InstructionBuilder();
         GotoTableCaseBuilder goToCaseBuilder = new GotoTableCaseBuilder();
@@ -133,7 +133,7 @@ public class FlowModInputMessageFactoryTest {
         return instructions;
     }
 
-    private Match createMatch() {
+    private static Match createMatch() {
         MatchBuilder matchBuilder = new MatchBuilder();
         matchBuilder.setType(OxmMatchType.class);
         final List<MatchEntry> entries = new ArrayList<>();
index 2e32248ca028513e12870d564d32ccb42192ac49..ddcc34225189af04ca187edfe3ad0128bacdc240 100644 (file)
@@ -62,7 +62,7 @@ public class PacketOutInputMessageFactoryTest {
         Assert.assertArrayEquals("Wrong data", data, deserializedMessage.getData());
     }
 
-    private List<Action> createAction() {
+    private static List<Action> createAction() {
         final List<Action> actions = new ArrayList<>();
         ActionBuilder actionBuilder = new ActionBuilder();
         PushVlanCaseBuilder pushVlanCaseBuilder = new PushVlanCaseBuilder();
@@ -85,5 +85,4 @@ public class PacketOutInputMessageFactoryTest {
         actions.add(actionBuilder.build());
         return actions;
     }
-
 }
index 4badfd94b7cbfecdfb35e4a5a28ad7beb2219e45..20dcc678d1fe32ffa5703688ffaf5f23c2ec0040 100644 (file)
@@ -76,7 +76,7 @@ public class OF10QueueGetConfigReplyMessageFactoryTest {
         serializedBuffer.skipBytes(6);
     }
 
-    private List<Queues> createQueues() {
+    private static List<Queues> createQueues() {
         List<Queues> list = new ArrayList<>();
         QueuesBuilder builder = new QueuesBuilder();
         builder.setQueueId(new QueueId(1L));
index d59acb0aeffeeaca030493f259ce26f5b09a5a9e..e203b0baf1b713276a6ef7ddeff97cd36abadd92 100644 (file)
@@ -5,7 +5,6 @@
  * 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.serialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -50,7 +49,7 @@ public class OxmPacketTypeSerializerTest {
         assertEquals(packetType, buffer.readUnsignedInt());
     }
 
-    private MatchEntry createMatchEntry(long packetType) {
+    private static MatchEntry createMatchEntry(long packetType) {
         PacketTypeCase packetTypeCase = new PacketTypeCaseBuilder()
                 .setPacketType(new PacketTypeBuilder().setPacketType(packetType).build())
                 .build();
index 1efac4a99ef581f1da4d5ce0836bd218132322fd..1864ac29c6a3a5e248cd23d708e8cf69dbbee671 100644 (file)
@@ -123,7 +123,7 @@ public class SystemNotificationsListenerImpl implements SystemNotificationsListe
         }
     }
 
-    private void logErrors(final InetSocketAddress remoteAddress, final RpcResult<EchoOutput> echoReplyValue) {
+    private static void logErrors(final InetSocketAddress remoteAddress, final RpcResult<EchoOutput> echoReplyValue) {
         for (RpcError replyError : echoReplyValue.getErrors()) {
             Throwable cause = replyError.getCause();
             if (LOG.isWarnEnabled()) {
@@ -140,9 +140,9 @@ public class SystemNotificationsListenerImpl implements SystemNotificationsListe
     @Override
     public void onSslConnectionError(SslConnectionError notification) {
         IpAddress ip = null;
-        if ((connectionContext.getConnectionAdapter() != null)
-                && (connectionContext.getConnectionAdapter().getRemoteAddress() != null)
-                && (connectionContext.getConnectionAdapter().getRemoteAddress().getAddress() != null)) {
+        if (connectionContext.getConnectionAdapter() != null
+                && connectionContext.getConnectionAdapter().getRemoteAddress() != null
+                && connectionContext.getConnectionAdapter().getRemoteAddress().getAddress() != null) {
             ip = IpAddressBuilder.getDefaultInstance(
                     connectionContext.getConnectionAdapter().getRemoteAddress().getAddress().getHostAddress());
         }
index 7695b0eddbd59e9d6976d22a8e7c60bdff181a88..c85506daac35448ac00b5b6e0174a02694278ee7 100644 (file)
@@ -46,7 +46,7 @@ public class FlowStatsMultipartWriter extends AbstractMultipartWriter<FlowAndSta
 
     @Override
     public void storeStatistics(final FlowAndStatisticsMapList statistics, final boolean withParents) {
-        statistics.nonnullFlowAndStatisticsMapList().values()
+        statistics.nonnullFlowAndStatisticsMapList()
             .forEach(stat -> {
                 final FlowBuilder flow = new FlowBuilder(stat)
                     .addAugmentation(
index 3b75ff9dab372295909d00fbbb48d3e2b3e1d397..cf0e004d1a0a362dff022a678f319798567e4910 100644 (file)
@@ -241,6 +241,7 @@ public class ContextChainHolderImpl implements ContextChainHolder, MasterChecker
                 }
             } else if (contextChain.isMastered(mastershipState, false)) {
                 LOG.info("Role MASTER was granted to device {}", deviceInfo);
+                OF_EVENT_LOG.debug("Master Elected, Node: {}", deviceInfo.getDatapathId());
                 deviceManager.sendNodeAddedNotification(deviceInfo.getNodeInstanceIdentifier());
             }
         });
@@ -421,7 +422,7 @@ public class ContextChainHolderImpl implements ContextChainHolder, MasterChecker
         };
     }
 
-    private String getDpnIdFromNodeName(final String nodeName) {
+    private static String getDpnIdFromNodeName(final String nodeName) {
         return nodeName.substring(nodeName.lastIndexOf(SEPARATOR) + 1);
     }
 
@@ -439,7 +440,7 @@ public class ContextChainHolderImpl implements ContextChainHolder, MasterChecker
         return Optional.empty();
     }
 
-    private org.opendaylight.mdsal.eos.binding.api.Entity createNodeEntity(final String nodeId) {
+    private static org.opendaylight.mdsal.eos.binding.api.Entity createNodeEntity(final String nodeId) {
         return new org.opendaylight.mdsal.eos.binding.api.Entity(ASYNC_SERVICE_ENTITY_TYPE, nodeId);
     }
 }
index 8f944e0532e642811a380892294bc67fe7a9e23f..694ab0beff9d9460368d45cb4a4ab25e26bf2d21 100644 (file)
@@ -25,10 +25,8 @@ import org.opendaylight.openflowplugin.impl.protocol.deserialization.util.Instru
 import org.opendaylight.openflowplugin.impl.util.MatchUtil;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter64;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.multipart.reply.multipart.reply.body.MultipartReplyFlowStatsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
@@ -54,7 +52,6 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer<Multi
     public MultipartReplyBody deserialize(ByteBuf message) {
         final MultipartReplyFlowStatsBuilder builder = new MultipartReplyFlowStatsBuilder();
         final List<FlowAndStatisticsMapList> items = new ArrayList<>();
-        int key = 0;
 
         while (message.readableBytes() > 0) {
             final FlowAndStatisticsMapListBuilder itemBuilder = new FlowAndStatisticsMapListBuilder();
@@ -118,7 +115,6 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer<Multi
                         .build());
             }
 
-            itemBuilder.withKey(new FlowAndStatisticsMapListKey(new FlowId(String.valueOf(key++))));
             items.add(itemBuilder.build());
         }
 
index 96d4353a888b896d1c37f912ddbe783ffef3e8e1..b72893e99cbad652ea38a4674604d92ce4a404ea 100644 (file)
@@ -107,7 +107,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
                 .build();
     }
 
-    private TableConfig readTableConfig(final ByteBuf message) {
+    private static TableConfig readTableConfig(final ByteBuf message) {
         final long input = message.readUnsignedInt();
         final boolean deprecated = (input & 3) != 0;
 
@@ -278,7 +278,7 @@ public class MultipartReplyTableFeaturesDeserializer implements OFDeserializer<M
             .build();
     }
 
-    private List<SetFieldMatch> readMatchFields(final ByteBuf message, final int length) {
+    private static List<SetFieldMatch> readMatchFields(final ByteBuf message, final int length) {
         final List<SetFieldMatch> matchFields = new ArrayList<>();
 
         final int startIndex = message.readerIndex();
index 2f24ac45773630eb8539c797aabff2a3284fd15c..733301f079125979672f15cdcc28aa050e243882 100644 (file)
@@ -195,7 +195,7 @@ public abstract class AbstractMatchEntrySerializer<E, M> implements MatchEntrySe
      */
     protected static void writeMacAddress(final MacAddress address, final ByteBuf outBuffer) {
         // 48 b + mask [OF 1.3.2 spec]
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(address));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(address));
     }
 
     /**
index 7c4345906cca46c503e65cf041d4d0109d664cf1..ffcf596f0d4420abac00156167704e6211fd0ab2 100644 (file)
@@ -37,7 +37,7 @@ public class PortMessageSerializer extends AbstractMessageSerializer<PortMessage
         outBuffer.writeInt(OpenflowPortsUtil
                 .getProtocolPortNumber(OpenflowVersion.OF13, message.getPortNumber()).intValue());
         outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_01);
-        outBuffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(message.getHardwareAddress()));
+        outBuffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(message.getHardwareAddress()));
         outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_02);
         outBuffer.writeInt(createPortConfigBitMask(message.getConfiguration()));
         outBuffer.writeInt(MoreObjects
index e242852ee9dfb049d3d75ea6c80221def1b9baff..ec86351ef7a6a94ebf3cfb84dfb5571aa617ac5e 100644 (file)
@@ -38,7 +38,7 @@ public final class SalEchoServiceImpl implements SalEchoService {
         return transform(echoService.handleServiceCall(echoInputBld));
     }
 
-    private ListenableFuture<RpcResult<SendEchoOutput>>
+    private static ListenableFuture<RpcResult<SendEchoOutput>>
             transform(final ListenableFuture<RpcResult<EchoOutput>> rpcResultListenableFuture) {
         return Futures.transform(rpcResultListenableFuture, input -> {
             Preconditions.checkNotNull(input, "echoOutput value is never expected to be NULL");
index 975389fdf4554bf20d047137d674cf96609f8b89..d6e149ceb52bdf2d4749cb5abaa3aa19813510e7 100644 (file)
@@ -60,7 +60,7 @@ public final class SalPortServiceImpl
         return mdInput.build();
     }
 
-    private Port getPortFromInput(final UpdatePortInput input) {
+    private static Port getPortFromInput(final UpdatePortInput input) {
         return input.getUpdatedPort().getPort().nonnullPort().values().iterator().next();
     }
 }
index e88e8808ddd7cc658b0625f5afd61118e00b874d..c6593134b95b7f4e8d33307b7e28d24921f763ac 100644 (file)
@@ -90,7 +90,7 @@ final class MeterFeaturesService
     }
 
     @VisibleForTesting
-    protected List<Class<? extends MeterBand>> extractSupportedMeterBand(MultipartReplyMeterFeatures replyBody,
+    protected static List<Class<? extends MeterBand>> extractSupportedMeterBand(MultipartReplyMeterFeatures replyBody,
                                                                          MeterBandTypeBitmap bandTypes) {
         List<Class<? extends MeterBand>> supportedMeterBand = new ArrayList<>();
         if (bandTypes.isOFPMBTDROP()) {
index fff83bb8fe9740a5a97db9a75f3be91c0fa8758e..c7061d3b7ad40eb66a1e0bee11f34fe6a3c04981 100644 (file)
@@ -27,7 +27,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReply;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlowCase;
@@ -64,7 +63,6 @@ public class FlowDirectStatisticsService extends AbstractFlowDirectStatisticsSer
                     for (final FlowAndStatisticsMapList part : flowAndStatisticsMapLists) {
                         final FlowId flowId = new FlowId(generateFlowId(part).getValue());
                         statsList.add(new FlowAndStatisticsMapListBuilder(part)
-                                .withKey(new FlowAndStatisticsMapListKey(flowId))
                                 .setFlowId(flowId)
                                 .build());
                     }
index 27271d44297549529ddb814c4ae7a5794c562ab3..1b12b0b54b9205f3258173423053f47acfd76ec4 100644 (file)
@@ -21,7 +21,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetFlowStatisticsOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.multipart.reply.multipart.reply.body.MultipartReplyFlowStats;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.multipart.request.multipart.request.body.MultipartRequestFlowStatsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.multipart.request.multipart.request.body.multipart.request.flow.stats.FlowStatsBuilder;
@@ -44,12 +43,11 @@ public class FlowDirectStatisticsService extends AbstractFlowDirectStatisticsSer
             .setFlowAndStatisticsMapList(input
                 .stream()
                 .flatMap(multipartReply -> ((MultipartReplyFlowStats) multipartReply.getMultipartReplyBody())
-                    .nonnullFlowAndStatisticsMapList().values()
+                    .nonnullFlowAndStatisticsMapList()
                     .stream())
                 .map(flowAndStatisticsMapList -> {
                     final FlowId flowId = new FlowId(generateFlowId(flowAndStatisticsMapList));
                     return new FlowAndStatisticsMapListBuilder(flowAndStatisticsMapList)
-                        .withKey(new FlowAndStatisticsMapListKey(flowId))
                         .setFlowId(flowId)
                         .build();
                 })
index a093246be6c6266345bcf002d69a69c92ff35283..20f0aa6926928fadad7cc61b3f6eef65944d6e27 100644 (file)
@@ -77,7 +77,7 @@ public class FlowRemovedTranslator implements MessageTranslator
         return Uint8.valueOf(flowRemoved.getTableId().getValue());
     }
 
-    private RemovedFlowReason translateReason(final FlowRemoved removedFlow) {
+    private static RemovedFlowReason translateReason(final FlowRemoved removedFlow) {
         LOG.debug("--Entering translateReason within FlowRemovedTranslator with reason: {}", removedFlow.getReason());
         switch (removedFlow.getReason()) {
             case OFPRRIDLETIMEOUT:
index 49cd3416b06e8fc134fc16e67b71b25f4fac5aa1..82237057ff38192d8e586a9247f8ae17c838f240 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.common;
 
 import org.junit.Assert;
@@ -261,7 +260,7 @@ public class MultipartRequestInputFactoryTest {
         Assert.assertEquals(xid, mpRqInput.getXid().longValue());
     }
 
-    private void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
+    private static void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
             MultipartRequestBody> expectedMpRqBodyClass) {
         Assert.assertTrue(expectedMpRqBodyClass.isAssignableFrom(mpRqBody));
         Assert.assertEquals(expectedMpRqBodyClass, mpRqBody);
index e0f7feb42e4386cbf18fa0e4aab1a876659e910a..b96f6b0e3d951fb55d1709d2fa1a442ef67d4002 100644 (file)
@@ -288,7 +288,7 @@ public class DeviceContextImplTest {
         verify(writeTx).commit();
     }
 
-    private ConnectionContext prepareConnectionContext() {
+    private static ConnectionContext prepareConnectionContext() {
         final ConnectionContext mockedConnectionContext = mock(ConnectionContext.class);
         final FeaturesReply mockedFeaturesReply = mock(FeaturesReply.class);
         when(mockedFeaturesReply.getAuxiliaryId()).thenReturn(DUMMY_AUXILIARY_ID);
index 75bbd1e8469c12322c9dd1d6f343593352d4026a..8d9c81e14266f742d85162cb4dcf90ee266324ad 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -29,7 +28,7 @@ public class ArpSourceHardwareAddressEntryDeserializerTest extends AbstractMatch
         final MacAddress arpSourceHardwareAddressMask = new MacAddress("00:00:00:00:00:00");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpSourceHardwareAddress));
 
         assertEquals(arpSourceHardwareAddress.getValue(),
                 ((ArpMatch) deserialize(in).getLayer3Match()).getArpSourceHardwareAddress().getAddress()
@@ -37,8 +36,8 @@ public class ArpSourceHardwareAddressEntryDeserializerTest extends AbstractMatch
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddress));
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddressMask));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpSourceHardwareAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpSourceHardwareAddressMask));
 
         final ArpSourceHardwareAddress desAddress =
                 ((ArpMatch) deserialize(in).getLayer3Match()).getArpSourceHardwareAddress();
index 6d5a189d3b5b3e7cdca0876a518932f17f87413d..a70be6589d360f0f2e750e4eae6c7514d3ce599e 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -29,7 +28,7 @@ public class ArpTargetHardwareAddressEntryDeserializerTest extends AbstractMatch
         final MacAddress arpTargetHardwareAddressMask = new MacAddress("00:00:00:00:00:00");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpTargetHardwareAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpTargetHardwareAddress));
 
         assertEquals(arpTargetHardwareAddress.getValue(),
                 ((ArpMatch) deserialize(in).getLayer3Match()).getArpTargetHardwareAddress().getAddress()
@@ -37,8 +36,8 @@ public class ArpTargetHardwareAddressEntryDeserializerTest extends AbstractMatch
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpTargetHardwareAddress));
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpTargetHardwareAddressMask));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpTargetHardwareAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(arpTargetHardwareAddressMask));
 
         final ArpTargetHardwareAddress desAddress =
                 ((ArpMatch) deserialize(in).getLayer3Match()).getArpTargetHardwareAddress();
index 7f3a6aa19c263e9fa5ab9b33f5b410db27f0f900..93e95cbae1593ad2fa404d773956bd0177c9019a 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -28,15 +27,15 @@ public class EthernetDestinationEntryDeserializerTest extends AbstractMatchEntry
         final MacAddress ethernetDestinationAddressMask = new MacAddress("00:00:00:00:00:00");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetDestinationAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetDestinationAddress));
 
         assertEquals(ethernetDestinationAddress.getValue(), deserialize(in).getEthernetMatch().getEthernetDestination()
                 .getAddress().getValue());
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetDestinationAddress));
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetDestinationAddressMask));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetDestinationAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetDestinationAddressMask));
 
         final EthernetDestination desAddress = deserialize(in).getEthernetMatch().getEthernetDestination();
         assertEquals(ethernetDestinationAddress.getValue(), desAddress.getAddress().getValue());
index 47db37a605418ac464bab06a17ddc82d9eced5b3..f47ee760bc07c2001c829e8e4f1c2d35f8f6b477 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -28,15 +27,15 @@ public class EthernetSourceEntryDeserializerTest extends AbstractMatchEntryDeser
         final MacAddress ethernetSourceAddressMask = new MacAddress("00:00:00:00:00:00");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetSourceAddress));
 
         assertEquals(ethernetSourceAddress.getValue(),
                 deserialize(in).getEthernetMatch().getEthernetSource().getAddress().getValue());
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddress));
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ethernetSourceAddressMask));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetSourceAddress));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ethernetSourceAddressMask));
 
         final EthernetSource desAddress = deserialize(in).getEthernetMatch().getEthernetSource();
         assertEquals(ethernetSourceAddress.getValue(), desAddress.getAddress().getValue());
index 0abb27f6b3ae8a4c441ba97a279789d825b21cd6..70f6f042d2602a6e55163c65ea3c1b67471d25f7 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -27,7 +26,7 @@ public class Ipv6NdSllEntryDeserializerTest extends AbstractMatchEntryDeserializ
         final MacAddress address = new MacAddress("00:01:02:03:04:05");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(address));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(address));
 
         Ipv6Match match = (Ipv6Match) deserialize(in).getLayer3Match();
         assertEquals(address.getValue(), match.getIpv6NdSll().getValue());
@@ -48,5 +47,4 @@ public class Ipv6NdSllEntryDeserializerTest extends AbstractMatchEntryDeserializ
     protected int getValueLength() {
         return EncodeConstants.MAC_ADDRESS_LENGTH;
     }
-
 }
index 110833cb3aa7201de26cdf66fc25b93ee779acc5..6860936da9f4dd4e7f4594f2e7bf212412b029db 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -27,7 +26,7 @@ public class Ipv6NdTllEntryDeserializerTest extends AbstractMatchEntryDeserializ
         final MacAddress address = new MacAddress("00:01:02:03:04:05");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(address));
+        in.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(address));
 
         Ipv6Match match = (Ipv6Match) deserialize(in).getLayer3Match();
         assertEquals(address.getValue(), match.getIpv6NdTll().getValue());
@@ -48,5 +47,4 @@ public class Ipv6NdTllEntryDeserializerTest extends AbstractMatchEntryDeserializ
     protected int getValueLength() {
         return EncodeConstants.MAC_ADDRESS_LENGTH;
     }
-
 }
index e7619d85eb90f0c77960e609893f9769377ce5e0..230d2fd7e7b0ede5ca99849cd2fb98c6194d43c6 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.messages;
 
 import static org.junit.Assert.assertEquals;
@@ -66,7 +65,7 @@ public class PortMessageDeserializerTest extends AbstractDeserializerTest {
         buffer.writeInt(XID);
         buffer.writeInt(PORT);
         buffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_1);
-        buffer.writeBytes(IetfYangUtil.INSTANCE.bytesFor(ADDRESS));
+        buffer.writeBytes(IetfYangUtil.INSTANCE.macAddressBytes(ADDRESS));
 
         final int config = ByteBufUtils.fillBitMaskFromMap(ImmutableMap
                 .<Integer, Boolean>builder()
index 3e4dbd174c9b25d873caac32841c424c806c6754..a9c40ffe3d88fe5b31a05e6feb834ac130e40467 100644 (file)
@@ -130,7 +130,7 @@ public class MultipartReplyFlowStatsDeserializerTest extends AbstractMultipartDe
 
         final MultipartReplyFlowStats reply = (MultipartReplyFlowStats) deserializeMultipart(buffer);
         final FlowAndStatisticsMapList flowAndStatisticsMapList =
-                reply.nonnullFlowAndStatisticsMapList().values().iterator().next();
+                reply.nonnullFlowAndStatisticsMapList().iterator().next();
         assertEquals(TABLE_ID, flowAndStatisticsMapList.getTableId().shortValue());
         assertEquals(SECOND, flowAndStatisticsMapList.getDuration().getSecond().getValue().intValue());
         assertEquals(NANOSECOND, flowAndStatisticsMapList.getDuration().getNanosecond().getValue().intValue());
index eb2bc28cb4fcb7a093bafb90a3100148155e067a..f5e181330b258dfbdce2b53ef68079eabe4e1f02 100644 (file)
@@ -135,7 +135,7 @@ public class MultipartReplyMessageDeserializerTest extends AbstractDeserializerT
 
         assertEquals(XID, message.getXid().intValue());
         final FlowAndStatisticsMapList flowAndStatisticsMapList =
-                reply.nonnullFlowAndStatisticsMapList().values().iterator().next();
+                reply.nonnullFlowAndStatisticsMapList().iterator().next();
         assertEquals(TABLE_ID, flowAndStatisticsMapList.getTableId().shortValue());
         assertEquals(SECOND, flowAndStatisticsMapList.getDuration().getSecond().getValue().intValue());
         assertEquals(NANOSECOND, flowAndStatisticsMapList.getDuration().getNanosecond().getValue().intValue());
index bff961fee34de273b0fa9850acca40b881d606a0..a88d54d031e29bea8613861b93815ba378e7a47e 100644 (file)
@@ -85,7 +85,7 @@ public class MultipartReplyMeterConfigDeserializerTest extends AbstractMultipart
         return MultipartType.OFPMPMETERCONFIG.getIntValue();
     }
 
-    private void writeCommonAtributes(final ByteBuf buffer) {
+    private static void writeCommonAtributes(final ByteBuf buffer) {
         buffer.writeShort(ITEM_LENGTH);
         buffer.writeShort(ByteBufUtils.fillBitMask(0,
                 FLAGS.isMeterKbps(),
index 77347964f4b824c438ed1fe8830ed002579bcd09..3ea4969315813e1945b1f3a1ba6a6da6ac025b8c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.protocol.deserialization.multipart;
 
 import static org.junit.Assert.assertEquals;
@@ -58,7 +57,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.VlanV
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.set.field.match.SetFieldMatch;
 
 public class TableFeaturesMatchFieldDeserializerTest {
-    private TableFeaturesMatchFieldDeserializer deserializer = new TableFeaturesMatchFieldDeserializer();
+    private final TableFeaturesMatchFieldDeserializer deserializer = new TableFeaturesMatchFieldDeserializer();
 
     @Test
     public void deserialize() {
@@ -223,7 +222,7 @@ public class TableFeaturesMatchFieldDeserializerTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private void addValues(ByteBuf buffer, int oxmClass, int oxmField) {
+    private static void addValues(ByteBuf buffer, int oxmClass, int oxmField) {
         buffer.clear();
         buffer.writeShort(oxmClass);
         buffer.writeByte(oxmField << 1);
index ae03f75565b504bef29d80ec2664218fd4306d03..2651f75f8434f91a363e627b8b6e1eba7a254da5 100644 (file)
@@ -72,7 +72,7 @@ public class FlowRegistryKeyFactoryTest {
         FlowsStatisticsUpdate flowStats = FLOWS_STATISTICS_UPDATE_BUILDER.build();
 
         HashSet<FlowRegistryKey> flowRegistryKeys = new HashSet<>();
-        for (FlowAndStatisticsMapList item : flowStats.nonnullFlowAndStatisticsMapList().values()) {
+        for (FlowAndStatisticsMapList item : flowStats.nonnullFlowAndStatisticsMapList()) {
             final FlowRegistryKey key1 = FlowRegistryKeyFactory.create(deviceInfo.getVersion(), item);
             final FlowRegistryKey key2 = FlowRegistryKeyFactory.create(deviceInfo.getVersion(), item);
             flowRegistryKeys.add(key1);
@@ -178,7 +178,7 @@ public class FlowRegistryKeyFactoryTest {
     public void testGetHash() {
         FlowsStatisticsUpdate flowStats = FLOWS_STATISTICS_UPDATE_BUILDER.build();
 
-        for (FlowAndStatisticsMapList item : flowStats.nonnullFlowAndStatisticsMapList().values()) {
+        for (FlowAndStatisticsMapList item : flowStats.nonnullFlowAndStatisticsMapList()) {
             FlowRegistryKey flowRegistryKey = FlowRegistryKeyFactory.create(deviceInfo.getVersion(), item);
             FlowRegistryKey lastHash = null;
             if (null != lastHash) {
index 0b838129f18c150df26e2314dcf08057ee5f1afe..09ff0ce30018828942ca8cfc4759c4dd97609c03 100644 (file)
@@ -12,7 +12,6 @@ import java.math.BigInteger;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder;
@@ -53,7 +52,7 @@ public final class TestFlowHelper {
         matchBuilder.setEthernetMatch(ethernetMatchBuilder.build());
 
         flowAndStatisticsMapListBuilder.setMatch(matchBuilder.build());
-        flowAndStatisticsMapListBuilder.withKey(new FlowAndStatisticsMapListKey(new FlowId(String.valueOf(index))));
+        flowAndStatisticsMapListBuilder.setFlowId(new FlowId(String.valueOf(index)));
         return flowAndStatisticsMapListBuilder;
     }
 }
index 14952672a0e26eeed9554b92c74e0cfcd0c4d87e..51efab96b2b205b6d4f231ed1b6431e4d49b33b1 100644 (file)
@@ -12,6 +12,7 @@ import static org.junit.Assert.assertTrue;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.Collection;
+import java.util.concurrent.ExecutionException;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.connection.DeviceRequestFailedException;
@@ -54,9 +55,7 @@ public class AbstractRequestCallbackTest {
             public void onSuccess(final Object object) {
 
             }
-
         };
-
     }
 
     @Test
@@ -79,8 +78,8 @@ public class AbstractRequestCallbackTest {
         assertEquals(DUMMY_MESSAGE_ILLEGAL_STATE_EXCEPTION, rpcError.getMessage());
     }
 
-    private RpcError provideRpcError(final ListenableFuture futureResult) throws InterruptedException,
-                                                                           java.util.concurrent.ExecutionException {
+    private static RpcError provideRpcError(final ListenableFuture futureResult)
+            throws InterruptedException, ExecutionException {
         final Object result = futureResult.get();
         assertTrue(result instanceof RpcResult);
         RpcResult rpcResult = (RpcResult) result;
index ab836d1405553b33aa0759e0a86e8913e4cf7556..f22546aa4cc5f1597311abd396a4b613d1e89109 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.services.batch;
 
 import com.google.common.collect.Lists;
@@ -71,19 +70,19 @@ public class FlatBatchFlowAdaptersTest {
         Assert.assertEquals("2", iterator.next().getFlowId().getValue());
     }
 
-    private FlatBatchAddFlow createAddFlowBatch(final String flowIdValue) {
+    private static FlatBatchAddFlow createAddFlowBatch(final String flowIdValue) {
         return new FlatBatchAddFlowBuilder()
                 .setFlowId(new FlowId(flowIdValue))
                 .build();
     }
 
-    private FlatBatchRemoveFlow createRemoveFlowBatch(final String flowIdValue) {
+    private static FlatBatchRemoveFlow createRemoveFlowBatch(final String flowIdValue) {
         return new FlatBatchRemoveFlowBuilder()
                 .setFlowId(new FlowId(flowIdValue))
                 .build();
     }
 
-    private FlatBatchUpdateFlow createUpdateFlowBatch(final String flowIdValue) {
+    private static FlatBatchUpdateFlow createUpdateFlowBatch(final String flowIdValue) {
         return new FlatBatchUpdateFlowBuilder()
                 .setFlowId(new FlowId(flowIdValue))
                 .build();
@@ -167,14 +166,15 @@ public class FlatBatchFlowAdaptersTest {
         Assert.assertEquals(0, rpcResult.getResult().nonnullBatchFailure().size());
     }
 
-    private BatchFailedFlowsOutput createBatchFailedFlowsOutput(final Integer batchOrder, final String flowIdValue) {
+    private static BatchFailedFlowsOutput createBatchFailedFlowsOutput(final Integer batchOrder,
+            final String flowIdValue) {
         return new BatchFailedFlowsOutputBuilder()
                 .setFlowId(new FlowId(flowIdValue))
                 .setBatchOrder(batchOrder)
                 .build();
     }
 
-    private BatchFailure createChainFailure(final int batchOrder, final String flowIdValue) {
+    private static BatchFailure createChainFailure(final int batchOrder, final String flowIdValue) {
         return new BatchFailureBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchItemIdChoice(new FlatBatchFailureFlowIdCaseBuilder()
index 4a6126f307da4851e15ef821a2eed12abdea13b1..35a8d6272060216a7c693bd244259591dcdd2157 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.services.batch;
 
 import com.google.common.collect.Lists;
@@ -73,19 +72,19 @@ public class FlatBatchGroupAdaptersTest {
         Assert.assertEquals(2L, iterator.next().getGroupId().getValue().longValue());
     }
 
-    private FlatBatchAddGroup createAddGroupBatch(final long groupIdValue) {
+    private static FlatBatchAddGroup createAddGroupBatch(final long groupIdValue) {
         return new FlatBatchAddGroupBuilder()
                 .setGroupId(new GroupId(groupIdValue))
                 .build();
     }
 
-    private FlatBatchRemoveGroup createRemoveGroupBatch(final long groupIdValue) {
+    private static FlatBatchRemoveGroup createRemoveGroupBatch(final long groupIdValue) {
         return new FlatBatchRemoveGroupBuilder()
                 .setGroupId(new GroupId(groupIdValue))
                 .build();
     }
 
-    private FlatBatchUpdateGroup createUpdateGroupBatch(final long groupIdValue) {
+    private static FlatBatchUpdateGroup createUpdateGroupBatch(final long groupIdValue) {
         return new FlatBatchUpdateGroupBuilder()
                 .setOriginalBatchedGroup(new OriginalBatchedGroupBuilder()
                         .setGroupId(new GroupId(groupIdValue))
@@ -173,14 +172,15 @@ public class FlatBatchGroupAdaptersTest {
         Assert.assertEquals(0, rpcResult.getResult().nonnullBatchFailure().size());
     }
 
-    private BatchFailedGroupsOutput createBatchFailedGroupsOutput(final Integer batchOrder, final long groupIdValue) {
+    private static BatchFailedGroupsOutput createBatchFailedGroupsOutput(final Integer batchOrder,
+            final long groupIdValue) {
         return new BatchFailedGroupsOutputBuilder()
                 .setGroupId(new GroupId(groupIdValue))
                 .setBatchOrder(batchOrder)
                 .build();
     }
 
-    private BatchFailure createChainFailure(final int batchOrder, final long groupIdValue) {
+    private static BatchFailure createChainFailure(final int batchOrder, final long groupIdValue) {
         return new BatchFailureBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchItemIdChoice(new FlatBatchFailureGroupIdCaseBuilder()
index ff9f50740f1f6840386a2d717fd63e825f1a602d..a7b34ee6508d80f6f547c143d90a17dd25cd021e 100644 (file)
@@ -73,19 +73,19 @@ public class FlatBatchMeterAdaptersTest {
         Assert.assertEquals(2L, it.next().getMeterId().getValue().longValue());
     }
 
-    private FlatBatchAddMeter createAddMeterBatch(final long groupIdValue) {
+    private static FlatBatchAddMeter createAddMeterBatch(final long groupIdValue) {
         return new FlatBatchAddMeterBuilder()
                 .setMeterId(new MeterId(groupIdValue))
                 .build();
     }
 
-    private FlatBatchRemoveMeter createRemoveMeterBatch(final long groupIdValue) {
+    private static FlatBatchRemoveMeter createRemoveMeterBatch(final long groupIdValue) {
         return new FlatBatchRemoveMeterBuilder()
                 .setMeterId(new MeterId(groupIdValue))
                 .build();
     }
 
-    private FlatBatchUpdateMeter createUpdateMeterBatch(final long groupIdValue) {
+    private static FlatBatchUpdateMeter createUpdateMeterBatch(final long groupIdValue) {
         return new FlatBatchUpdateMeterBuilder()
                 .setOriginalBatchedMeter(new OriginalBatchedMeterBuilder()
                         .setMeterId(new MeterId(groupIdValue))
@@ -173,14 +173,15 @@ public class FlatBatchMeterAdaptersTest {
         Assert.assertEquals(0, rpcResult.getResult().nonnullBatchFailure().size());
     }
 
-    private BatchFailedMetersOutput createBatchFailedMetersOutput(final Integer batchOrder, final long groupIdValue) {
+    private static BatchFailedMetersOutput createBatchFailedMetersOutput(final Integer batchOrder,
+            final long groupIdValue) {
         return new BatchFailedMetersOutputBuilder()
                 .setMeterId(new MeterId(groupIdValue))
                 .setBatchOrder(batchOrder)
                 .build();
     }
 
-    private BatchFailure createChainFailure(final int batchOrder, final long groupIdValue) {
+    private static BatchFailure createChainFailure(final int batchOrder, final long groupIdValue) {
         return new BatchFailureBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchItemIdChoice(new FlatBatchFailureMeterIdCaseBuilder()
index 1728d065f85bf6388e407e815cc3d5ef472a0817..12d79e5646ef343cf340125dceb06fdcbbc41aa3 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.services.sal;
 
 import static org.junit.Assert.assertEquals;
@@ -51,7 +50,7 @@ public class NodeConfigServiceImplTest extends ServiceMocking {
         assertEquals(DUMMY_XID_VALUE, setConfigInput.getXid());
     }
 
-    private SetConfigInput dummyConfigInput() {
+    private static SetConfigInput dummyConfigInput() {
         SetConfigInputBuilder setConfigInputBuilder = new SetConfigInputBuilder();
         setConfigInputBuilder.setFlag(DUMMY_FLAG_STR);
         setConfigInputBuilder.setMissSearchLength(DUMMY_MISS_SEARCH_LENGTH);
index dc02350ad61ca54bf06d9fed6f0fb2db2bbe9f02..eca5e7c7b8823a580c75ec0f37e6abd203d1fb5c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.services.sal;
 
 import com.google.common.collect.Lists;
@@ -317,7 +316,7 @@ public class SalFlatBatchServiceImplTest {
         return createFlowAddBatch(batchOrder, flowIdValue, 1);
     }
 
-    private Batch createFlowAddBatch(final int batchOrder, final String flowIdValue, final int amount) {
+    private static Batch createFlowAddBatch(final int batchOrder, final String flowIdValue, final int amount) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchAddFlowCaseBuilder()
@@ -326,7 +325,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private List<FlatBatchAddFlow> repeatFlatBatchAddFlowInList(final String flowIdValue, final int amount) {
+    private static List<FlatBatchAddFlow> repeatFlatBatchAddFlowInList(final String flowIdValue, final int amount) {
         final List<FlatBatchAddFlow> list = new ArrayList<>();
         for (int i = 0; i < amount; i++) {
             list.add(new FlatBatchAddFlowBuilder()
@@ -337,7 +336,7 @@ public class SalFlatBatchServiceImplTest {
         return list;
     }
 
-    private <T> List<T> repeatInList(final T item, final int amount) {
+    private static <T> List<T> repeatInList(final T item, final int amount) {
         final List<T> list = new ArrayList<>();
         for (int i = 0; i < amount; i++) {
             list.add(item);
@@ -345,7 +344,7 @@ public class SalFlatBatchServiceImplTest {
         return list;
     }
 
-    private Batch createFlowRemoveBatch(final int batchOrder, final String flowIdValue) {
+    private static Batch createFlowRemoveBatch(final int batchOrder, final String flowIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchRemoveFlowCaseBuilder()
@@ -356,7 +355,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createFlowUpdateBatch(final int batchOrder, final String flowIdValue) {
+    private static Batch createFlowUpdateBatch(final int batchOrder, final String flowIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .withKey(new BatchKey(batchOrder))
@@ -368,7 +367,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createGroupAddBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createGroupAddBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchAddGroupCaseBuilder()
@@ -379,7 +378,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createGroupRemoveBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createGroupRemoveBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchRemoveGroupCaseBuilder()
@@ -390,7 +389,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createGroupUpdateBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createGroupUpdateBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchUpdateGroupCaseBuilder()
@@ -406,7 +405,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createMeterAddBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createMeterAddBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchAddMeterCaseBuilder()
@@ -417,7 +416,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createMeterRemoveBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createMeterRemoveBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchRemoveMeterCaseBuilder()
@@ -428,7 +427,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private Batch createMeterUpdateBatch(final int batchOrder, final long groupIdValue) {
+    private static Batch createMeterUpdateBatch(final int batchOrder, final long groupIdValue) {
         return new BatchBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchChoice(new FlatBatchUpdateMeterCaseBuilder()
@@ -492,7 +491,7 @@ public class SalFlatBatchServiceImplTest {
                         .getFlowId().getValue());
     }
 
-    private BatchFailure createFlowBatchFailure(final int batchOrder, final String flowIdValue) {
+    private static BatchFailure createFlowBatchFailure(final int batchOrder, final String flowIdValue) {
         return new BatchFailureBuilder()
                 .setBatchOrder(batchOrder)
                 .setBatchItemIdChoice(new FlatBatchFailureFlowIdCaseBuilder()
@@ -501,7 +500,7 @@ public class SalFlatBatchServiceImplTest {
                 .build();
     }
 
-    private ProcessFlatBatchOutput createFlatBatchOutput(final BatchFailure... batchFailures) {
+    private static ProcessFlatBatchOutput createFlatBatchOutput(final BatchFailure... batchFailures) {
         return new ProcessFlatBatchOutputBuilder()
                 .setBatchFailure(Lists.newArrayList(batchFailures))
                 .build();
index a1fa555aafc9ce82d51476f1435306639776ea06..98de92c83adabdcf2420b46ffda782b663be1ef8 100644 (file)
@@ -56,7 +56,7 @@ public class SalPortServiceImplTest extends ServiceMocking {
         final OfHeader ofHeader = salPortService.buildRequest(new Xid(DUMMY_XID), dummyUpdatePortInput());
     }
 
-    private UpdatePortInput dummyUpdatePortInput() {
+    private static UpdatePortInput dummyUpdatePortInput() {
         org.opendaylight.yang.gen.v1.urn
                 .opendaylight.flow.types.port.rev130925.port.mod.port.PortBuilder concretePortBuilder
                 = new org.opendaylight.yang.gen.v1.urn
index da24425e36821ee40a983825cee770698dd06f20..a73ed9aa46eab22014765aee35b55819810d990f 100644 (file)
@@ -123,7 +123,7 @@ public class SalTableServiceImplTest extends ServiceMocking {
         verify(mockedRequestContextStack).createRequestContext();
     }
 
-    private UpdateTableInput prepareUpdateTable() {
+    private static UpdateTableInput prepareUpdateTable() {
         UpdateTableInputBuilder updateTableInputBuilder = new UpdateTableInputBuilder();
         UpdatedTableBuilder updatedTableBuilder = new UpdatedTableBuilder();
         updatedTableBuilder.setTableFeatures(Collections.emptyList());
index 59a6b272ea7164ebf344981c682ad3c69d2f267f..c5f605f7a5433b8731e5d0a872a6543edd5feb1b 100644 (file)
@@ -218,7 +218,7 @@ public class MultipartReplyTranslatorTest {
         assertEquals(DUMMY_GROUPS_TYPE,groupDescStat.getGroupType());
     }
 
-    private MultipartReplyBody prepareMultipartReplyGroupDesc() {
+    private static MultipartReplyBody prepareMultipartReplyGroupDesc() {
         GroupDescBuilder groupDescBuilder = new GroupDescBuilder();
         groupDescBuilder.setGroupId(DUMMY_GROUP_ID);
         groupDescBuilder.setBucketsList(Collections.emptyList());
@@ -231,7 +231,7 @@ public class MultipartReplyTranslatorTest {
         return multipartReplyGroupDescCaseBuilder.build();
     }
 
-    private MultipartReplyBody prepareMultipartReplyGroup() {
+    private static MultipartReplyBody prepareMultipartReplyGroup() {
         GroupStatsBuilder groupStatsBuilder = new GroupStatsBuilder();
         groupStatsBuilder.setByteCount(DUMMY_BYTE_COUNT);
         groupStatsBuilder.setBucketStats(Collections.emptyList());
@@ -247,7 +247,7 @@ public class MultipartReplyTranslatorTest {
         return multipartReplyGroupCaseBuilder.build();
     }
 
-    private MultipartReplyBody prepareMultipartReplyPortStats() {
+    private static MultipartReplyBody prepareMultipartReplyPortStats() {
         PortStatsBuilder dummyPortStatBuilder = new PortStatsBuilder();
         dummyPortStatBuilder.setPortNo(DUMMY_PORT_NO);
         dummyPortStatBuilder.setRxBytes(DUMMY_RX_BYTES);
@@ -271,7 +271,7 @@ public class MultipartReplyTranslatorTest {
     }
 
 
-    private MultipartReplyBody prepareMultipartReplyAggregate() {
+    private static MultipartReplyBody prepareMultipartReplyAggregate() {
         MultipartReplyAggregateBuilder multipartReplyAggregateBuilder = new MultipartReplyAggregateBuilder();
         multipartReplyAggregateBuilder.setByteCount(DUMMY_BYTE_COUNT);
         multipartReplyAggregateBuilder.setPacketCount(DUMMY_PACKET_COUNT);
@@ -282,7 +282,7 @@ public class MultipartReplyTranslatorTest {
         return multipartReplyAggregateCaseBuilder.build();
     }
 
-    private MultipartReplyBody prepareMultipartReplyFlow() {
+    private static MultipartReplyBody prepareMultipartReplyFlow() {
         MultipartReplyFlowCaseBuilder multipartReplyFlowCaseBuilder = new MultipartReplyFlowCaseBuilder();
         MultipartReplyFlowBuilder multipartReplyFlowBuilder = new MultipartReplyFlowBuilder();
         multipartReplyFlowBuilder.setFlowStats(Collections.emptyList());
@@ -290,7 +290,7 @@ public class MultipartReplyTranslatorTest {
         return multipartReplyFlowCaseBuilder.build();
     }
 
-    private MultipartReplyMessage prepareMocks(final DeviceContext mockedDeviceContext,
+    private static MultipartReplyMessage prepareMocks(final DeviceContext mockedDeviceContext,
                                                final MultipartReplyBody multipartReplyBody,
                                                final MultipartType multipartType) {
         ConnectionContext mockedConnectionContext = mock(ConnectionContext.class);
@@ -314,7 +314,7 @@ public class MultipartReplyTranslatorTest {
         return multipartReplyMessage;
     }
 
-    private DataContainer validateOutput(final DataContainer dataObject) {
+    private static DataContainer validateOutput(final DataContainer dataObject) {
         return dataObject;
     }
 }
index daa39ee38d0b66f054ad19733008a5409dfeee41..63fb5941d51e1397494c1102fa0eb4cd3d538fc9 100755 (executable)
@@ -207,7 +207,7 @@ public class StatisticsGatheringUtilsTest {
         Assert.assertEquals(42, flow.getValue().getTableId().intValue());
     }
 
-    private Iterable<FlowsStatisticsUpdate> prepareFlowStatisticsData() {
+    private static Iterable<FlowsStatisticsUpdate> prepareFlowStatisticsData() {
         final FlowAndStatisticsMapListBuilder flowAndStatsMapListBld = new FlowAndStatisticsMapListBuilder();
         flowAndStatsMapListBld.setTableId((short) 42);
         flowAndStatsMapListBld.setMatch(new MatchBuilder().build());
index 7080a4f0bb839ccee4b01cfdc1f6b0e64b67016f..36386b0ad8b8f26d07993e0dc7c683268fb39f69 100644 (file)
@@ -59,7 +59,7 @@ public class TimeCounterTest {
         Assert.assertTrue(timeCounter.getAverageTimeBetweenMarks() >= 3);
     }
 
-    private void zzz(long length) {
+    private static void zzz(long length) {
         try {
             Thread.sleep(length);
         } catch (InterruptedException e) {
index 8fa122c8c4ff56a811267db1e5dcfb215853e712..abb8d7aaf769acc768c6d4599d46e37fc5a4b04c 100644 (file)
@@ -13,7 +13,6 @@ import java.util.List;
 import org.junit.Test;
 import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy;
 
-
 public class MessageIntelligenceAgencyImplTest {
 
     @Test
@@ -26,14 +25,14 @@ public class MessageIntelligenceAgencyImplTest {
                 "FROM_SWITCH: MSG[String] -> +1 | 1", "TO_SWITCH_ENTERED: MSG[Integer] -> +1 | 1");
     }
 
-    private void findExpectedStatistics(final List<String> statisticsInfo, String ... expectedValues) {
+    private static void findExpectedStatistics(final List<String> statisticsInfo, String ... expectedValues) {
         for (String expectedValue : expectedValues) {
             assertTrue("Expected value " + expectedValue + "wasn't found.",
                     findValueInStatistics(statisticsInfo, expectedValue));
         }
     }
 
-    private boolean findValueInStatistics(List<String> statisticsInfo, String expectedValue) {
+    private static  boolean findValueInStatistics(List<String> statisticsInfo, String expectedValue) {
         for (String pieceOfInfo : statisticsInfo) {
             if (pieceOfInfo.equals(expectedValue)) {
                 return true;
index cf941cb1bd006501120f828c916aa601f588284b..abef16147711e9c763f912e72d0215bbd5e9d233 100644 (file)
@@ -18,7 +18,6 @@ import static org.mockito.Mockito.when;
 import java.math.BigInteger;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import org.opendaylight.openflowplugin.api.openflow.registry.flow.DeviceFlowRegistry;
@@ -29,7 +28,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowAndStatisticsMap;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
@@ -102,7 +100,7 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
         final GetFlowStatisticsOutput output = service.buildReply(input, true);
         assertTrue(output.nonnullFlowAndStatisticsMapList().size() > 0);
 
-        final FlowAndStatisticsMap stats = output.nonnullFlowAndStatisticsMapList().values().iterator().next();
+        final FlowAndStatisticsMap stats = output.nonnullFlowAndStatisticsMapList().iterator().next();
 
         assertEquals(stats.getTableId(), TABLE_NO);
     }
@@ -113,8 +111,7 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
         when(stat.getTableId()).thenReturn(TABLE_NO);
         when(stat.getMatch()).thenReturn(new MatchBuilder().build());
 
-        final Map<FlowAndStatisticsMapListKey, FlowAndStatisticsMapList> stats
-                = Collections.singletonMap(stat.key(), stat);
+        final List<FlowAndStatisticsMapList> stats = Collections.singletonList(stat);
         final GetFlowStatisticsOutput output = mock(GetFlowStatisticsOutput.class);
         when(output.nonnullFlowAndStatisticsMapList()).thenReturn(stats);
 
index 06753337c0be2595d890dc34be52cade910a4049..f19e2a537b1c03cd0bbec1fb7b6965d8f0420c4b 100644 (file)
@@ -16,9 +16,9 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.math.BigInteger;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
 import org.opendaylight.openflowplugin.api.openflow.registry.flow.DeviceFlowRegistry;
@@ -26,23 +26,29 @@ import org.opendaylight.openflowplugin.impl.registry.flow.FlowDescriptorFactory;
 import org.opendaylight.openflowplugin.impl.statistics.services.direct.AbstractDirectStatisticsServiceTest;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter32;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Counter64;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetFlowStatisticsInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.direct.statistics.rev160511.GetFlowStatisticsOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowAndStatisticsMap;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.flow.and.statistics.map.list.FlowAndStatisticsMapListKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.multipart.reply.multipart.reply.body.MultipartReplyFlowStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowModFlags;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.multipart.request.multipart.request.body.MultipartRequestFlowStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetDestinationBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.duration.DurationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartReply;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartReplyBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.multipart.types.rev170112.MultipartRequest;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
+import org.opendaylight.yangtools.yang.common.Uint16;
 import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
 import org.opendaylight.yangtools.yang.common.Uint8;
 
 public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsServiceTest {
@@ -51,11 +57,11 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
 
     @Override
     public void setUp() {
+        final DeviceFlowRegistry registry = mock(DeviceFlowRegistry.class);
         service = new FlowDirectStatisticsService(requestContextStack,
                                                   deviceContext,
                                                   convertorManager,
                                                   multipartWriterProvider);
-        final DeviceFlowRegistry registry = mock(DeviceFlowRegistry.class);
         when(registry.retrieveDescriptor(any())).thenReturn(FlowDescriptorFactory.create(TABLE_NO, new FlowId("1")));
         when(deviceContext.getDeviceFlowRegistry()).thenReturn(registry);
     }
@@ -78,13 +84,21 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
         final FlowAndStatisticsMapList flowStat = new FlowAndStatisticsMapListBuilder()
                 .setDuration(new DurationBuilder()
                         .setSecond(new Counter32(1L))
-                        .setNanosecond(new Counter32(1L))
+                        .setNanosecond(new Counter32(2L))
                         .build())
-                .setTableId(TABLE_NO)
-                .setByteCount(new Counter64(BigInteger.ONE))
-                .setPacketCount(new Counter64(BigInteger.ONE))
+                .setTableId(Uint8.valueOf(50))
+                .setByteCount(new Counter64(BigInteger.valueOf(7094)))
+                .setPacketCount(new Counter64(BigInteger.valueOf(63)))
+                .setCookie(new FlowCookie(Uint64.valueOf(134419365)))
                 .setFlags(new FlowModFlags(true, false, false, false, false))
-                .setMatch(new MatchBuilder().build())
+                .setMatch(new MatchBuilder().setEthernetMatch(
+                        new EthernetMatchBuilder()
+                                .setEthernetDestination(
+                                        new EthernetDestinationBuilder()
+                                                .setAddress(new MacAddress("fa:16:3e:92:81:45"))
+                                                .build()).build()).build())
+                .setInstructions(new InstructionsBuilder().build())
+                .setPriority(Uint16.valueOf(20))
                 .build();
 
         final MultipartReply reply = new MultipartReplyBuilder()
@@ -93,14 +107,41 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
                         .build())
                 .build();
 
-        final List<MultipartReply> input = Collections.singletonList(reply);
 
+        final FlowAndStatisticsMapList flowStat1 = new FlowAndStatisticsMapListBuilder()
+                .setDuration(new DurationBuilder()
+                        .setSecond(new Counter32(1L))
+                        .setNanosecond(new Counter32(2L))
+                        .build())
+                .setTableId(Uint8.valueOf(51))
+                .setByteCount(new Counter64(BigInteger.valueOf(9853)))
+                .setPacketCount(new Counter64(BigInteger.valueOf(99)))
+                .setCookie(new FlowCookie(Uint64.valueOf(134550437)))
+                .setFlags(new FlowModFlags(true, false, false, false, false))
+                .setMatch(new MatchBuilder().setEthernetMatch(
+                        new EthernetMatchBuilder()
+                                .setEthernetDestination(
+                                        new EthernetDestinationBuilder()
+                                                .setAddress(new MacAddress("fa:16:3e:92:81:45"))
+                                                .build()).build()).build())
+                .setInstructions(new InstructionsBuilder().build())
+                .setPriority(Uint16.valueOf(20))
+                .build();
+
+        final MultipartReply reply1 = new MultipartReplyBuilder()
+                .setMultipartReplyBody(new MultipartReplyFlowStatsBuilder()
+                        .setFlowAndStatisticsMapList(Collections.singletonList(flowStat1))
+                        .build())
+                .build();
+        final List<MultipartReply> input = new ArrayList<>();
+        input.add(reply);
+        input.add(reply1);
         final GetFlowStatisticsOutput output = service.buildReply(input, true);
         assertTrue(output.getFlowAndStatisticsMapList().size() > 0);
-
-        final FlowAndStatisticsMap stats = output.nonnullFlowAndStatisticsMapList().values().iterator().next();
-
-        assertEquals(stats.getTableId(), TABLE_NO);
+        FlowAndStatisticsMap stats = output.nonnullFlowAndStatisticsMapList().iterator().next();
+        assertEquals(Uint8.valueOf(50),stats.getTableId());
+        stats = output.nonnullFlowAndStatisticsMapList().get(1);
+        assertEquals(Uint8.valueOf(51),stats.getTableId());
     }
 
     @Override
@@ -109,8 +150,8 @@ public class FlowDirectStatisticsServiceTest extends AbstractDirectStatisticsSer
         when(stat.getTableId()).thenReturn(TABLE_NO);
         when(stat.getMatch()).thenReturn(new MatchBuilder().build());
 
-        final Map<FlowAndStatisticsMapListKey, FlowAndStatisticsMapList> stats
-                = Collections.singletonMap(stat.key(), stat);
+        final List<FlowAndStatisticsMapList> stats
+                = Collections.singletonList(stat);
         final GetFlowStatisticsOutput output = mock(GetFlowStatisticsOutput.class);
         when(output.nonnullFlowAndStatisticsMapList()).thenReturn(stats);
 
index 6c99feb20a2ba96f4049d54801ed902e5828d183..d86e757bd540dc9a9247839a92ad15685c6b5c44 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.collect.Lists;
@@ -202,7 +201,7 @@ public class FlatBatchUtilTest {
         checkSegment(batchPlanSteps.get(index++), BatchStepType.GROUP_UPDATE, 3);
     }
 
-    private void checkSegment(final BatchPlanStep planStep, final BatchStepType stepType, final int expected) {
+    private static void checkSegment(final BatchPlanStep planStep, final BatchStepType stepType, final int expected) {
         Assert.assertEquals(stepType, planStep.getStepType());
         Assert.assertEquals(expected, planStep.getTaskBag().size());
     }
@@ -279,7 +278,7 @@ public class FlatBatchUtilTest {
                 .build();
     }
 
-    private List<FlatBatchAddGroup> repeatFlatBatchAddGroupIntoList(final int size) {
+    private static List<FlatBatchAddGroup> repeatFlatBatchAddGroupIntoList(final int size) {
         final List<FlatBatchAddGroup> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchAddGroupBuilder().withKey(new FlatBatchAddGroupKey(i)).build());
@@ -287,7 +286,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchUpdateGroup> repeatFlatBatchUpdateGroupIntoList(final int size) {
+    private static List<FlatBatchUpdateGroup> repeatFlatBatchUpdateGroupIntoList(final int size) {
         final List<FlatBatchUpdateGroup> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchUpdateGroupBuilder().withKey(new FlatBatchUpdateGroupKey(i)).build());
@@ -295,7 +294,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchRemoveGroup> repeatFlatBatchRemoveGroupIntoList(final int size) {
+    private static List<FlatBatchRemoveGroup> repeatFlatBatchRemoveGroupIntoList(final int size) {
         final List<FlatBatchRemoveGroup> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchRemoveGroupBuilder().withKey(new FlatBatchRemoveGroupKey(i)).build());
@@ -303,7 +302,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchAddFlow> repeatFlatBatchAddFlowIntoList(final int size) {
+    private static List<FlatBatchAddFlow> repeatFlatBatchAddFlowIntoList(final int size) {
         final List<FlatBatchAddFlow> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchAddFlowBuilder().withKey(new FlatBatchAddFlowKey(i)).build());
@@ -311,7 +310,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchUpdateFlow> repeatFlatBatchUpdateFlowIntoList(final int size) {
+    private static List<FlatBatchUpdateFlow> repeatFlatBatchUpdateFlowIntoList(final int size) {
         final List<FlatBatchUpdateFlow> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchUpdateFlowBuilder().withKey(new FlatBatchUpdateFlowKey(i)).build());
@@ -319,7 +318,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchRemoveFlow> repeatFlatBatchRemoveFlowIntoList(final int size) {
+    private static List<FlatBatchRemoveFlow> repeatFlatBatchRemoveFlowIntoList(final int size) {
         final List<FlatBatchRemoveFlow> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchRemoveFlowBuilder().withKey(new FlatBatchRemoveFlowKey(i)).build());
@@ -327,7 +326,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchAddMeter> repeatFlatBatchAddMeterIntoList(final int size) {
+    private static List<FlatBatchAddMeter> repeatFlatBatchAddMeterIntoList(final int size) {
         final List<FlatBatchAddMeter> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchAddMeterBuilder().withKey(new FlatBatchAddMeterKey(i)).build());
@@ -335,7 +334,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchUpdateMeter> repeatFlatBatchUpdateMeterIntoList(final int size) {
+    private static List<FlatBatchUpdateMeter> repeatFlatBatchUpdateMeterIntoList(final int size) {
         final List<FlatBatchUpdateMeter> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchUpdateMeterBuilder().withKey(new FlatBatchUpdateMeterKey(i)).build());
@@ -343,7 +342,7 @@ public class FlatBatchUtilTest {
         return list;
     }
 
-    private List<FlatBatchRemoveMeter> repeatFlatBatchRemoveMeterIntoList(final int size) {
+    private static List<FlatBatchRemoveMeter> repeatFlatBatchRemoveMeterIntoList(final int size) {
         final List<FlatBatchRemoveMeter> list = new ArrayList<>();
         for (int i = 0; i < size; i++) {
             list.add(new FlatBatchRemoveMeterBuilder().withKey(new FlatBatchRemoveMeterKey(i)).build());
index 83b16538337ef4571579086aeae7977ef7550d20..8b6f51033f0984ac57d98bb5cc8a268b2a983041 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.collect.Lists;
@@ -119,7 +118,7 @@ public class FlowUtilTest {
         checkBatchSuccessOutcomeTransformation(FlowUtil.FLOW_UPDATE_TRANSFORM.apply(input));
     }
 
-    private <T extends BatchFlowOutputListGrouping> void checkBatchSuccessOutcomeTransformation(
+    private static <T extends BatchFlowOutputListGrouping> void checkBatchSuccessOutcomeTransformation(
             final RpcResult<T> output) {
         Assert.assertTrue(output.isSuccessful());
         Map<BatchFailedFlowsOutputKey, BatchFailedFlowsOutput> failedFlows
@@ -221,13 +220,13 @@ public class FlowUtilTest {
         Assert.assertEquals(1, composite.getResult().getBatchFailedFlowsOutput().size());
     }
 
-    private RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
+    private static RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
         return RpcResultBuilder.<SendBarrierOutput>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-barrier-error")
                 .build();
     }
 
-    private RpcResult<AddFlowsBatchOutput> createAddFlowsBatchSuccessOutput() {
+    private static RpcResult<AddFlowsBatchOutput> createAddFlowsBatchSuccessOutput() {
         return RpcResultBuilder
                 .success(new AddFlowsBatchOutputBuilder()
                         .setBatchFailedFlowsOutput(Collections.emptyList())
@@ -235,7 +234,7 @@ public class FlowUtilTest {
                 .build();
     }
 
-    private RpcResult<AddFlowsBatchOutput> createAddFlowsBatchFailureOutcome() {
+    private static RpcResult<AddFlowsBatchOutput> createAddFlowsBatchFailureOutcome() {
         final RpcResult<List<BatchFailedFlowsOutput>> batchOutcomeWithError = createBatchOutcomeWithError();
         return RpcResultBuilder.<AddFlowsBatchOutput>failed()
                 .withResult(new AddFlowsBatchOutputBuilder()
index 9185c4a428b578e85d5aa1eaf53d06d2218c81b4..361c344933b7912fa25497a37704b6e8eee2ba2f 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import static org.junit.Assert.assertEquals;
@@ -226,13 +225,13 @@ public class GroupUtilTest {
         assertEquals(GROUP_ACTION_BITMAP,  groupActionsSupportBitmap.get(0).toJava());
     }
 
-    private RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
+    private static RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
         return RpcResultBuilder.<SendBarrierOutput>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-barrier-error")
                 .build();
     }
 
-    private RpcResult<AddGroupsBatchOutput> createAddGroupsBatchSuccessOutput() {
+    private static RpcResult<AddGroupsBatchOutput> createAddGroupsBatchSuccessOutput() {
         return RpcResultBuilder
                 .success(new AddGroupsBatchOutputBuilder()
                         .setBatchFailedGroupsOutput(Collections.emptyList())
@@ -240,7 +239,7 @@ public class GroupUtilTest {
                 .build();
     }
 
-    private RpcResult<AddGroupsBatchOutput> createAddGroupsBatchFailureOutcome() {
+    private static RpcResult<AddGroupsBatchOutput> createAddGroupsBatchFailureOutcome() {
         final RpcResult<List<BatchFailedGroupsOutput>> batchOutcomeWithError = createBatchOutcomeWithError();
         return RpcResultBuilder.<AddGroupsBatchOutput>failed()
                 .withResult(new AddGroupsBatchOutputBuilder()
index 75273c26af54eb75be485d92de9c78feb42ec0a6..20f92a4f12021995863fd3df30d2399194127757 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import static org.junit.Assert.assertEquals;
@@ -28,7 +27,7 @@ public class MatchUtilTest {
         assertEquals(expectedV10Match.build(),emptyV10Match.build());
     }
 
-    private MatchV10Builder expectedV10Match() {
+    private static MatchV10Builder expectedV10Match() {
         Short zeroShort = Short.valueOf("0");
         Integer zeroInteger = 0;
         MatchV10Builder matchV10Builder = new MatchV10Builder();
index a822c71d01c4e6492a310bf8505eb6cd67e3e561..04f58c05ac51d823d74ca8226d0af6de7f75cf4d 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.base.Function;
@@ -76,7 +75,7 @@ public class MeterUtilTest {
         Assert.assertEquals(1, output.getResult().get(0).getBatchOrder().intValue());
     }
 
-    private org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.Meter createBatchMeter(
+    private static org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.Meter createBatchMeter(
             final MeterId meterId) {
         return new MeterBuilder()
                 .setMeterId(meterId)
@@ -219,13 +218,13 @@ public class MeterUtilTest {
         Assert.assertEquals(1, composite.getResult().getBatchFailedMetersOutput().size());
     }
 
-    private RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
+    private static RpcResult<SendBarrierOutput> createBarrierFailureOutcome() {
         return RpcResultBuilder.<SendBarrierOutput>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-barrier-error")
                 .build();
     }
 
-    private RpcResult<AddMetersBatchOutput> createAddMetersBatchSuccessOutput() {
+    private static RpcResult<AddMetersBatchOutput> createAddMetersBatchSuccessOutput() {
         return RpcResultBuilder
                 .success(new AddMetersBatchOutputBuilder()
                         .setBatchFailedMetersOutput(Collections.emptyMap())
@@ -233,7 +232,7 @@ public class MeterUtilTest {
                 .build();
     }
 
-    private RpcResult<AddMetersBatchOutput> createAddMetersBatchFailureOutcome() {
+    private static RpcResult<AddMetersBatchOutput> createAddMetersBatchFailureOutcome() {
         final RpcResult<List<BatchFailedMetersOutput>> batchOutcomeWithError = createBatchOutcomeWithError();
         return RpcResultBuilder.<AddMetersBatchOutput>failed()
                 .withResult(new AddMetersBatchOutputBuilder()