- private static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list
- .Instruction> updateSetVlanIdAction(final FlowMessage message) {
- return message.getInstructions().getInstruction()
- .stream()
- .map(i -> {
- final int[] offset = {0};
+ private static Map<
+ org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey,
+ org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction>
+ updateSetVlanIdAction(final FlowMessage message) {
+ return message.getInstructions().nonnullInstruction().values().stream()
+ .map(FlowMessageSerializer::updateSetVlanIdAction)
+ .collect(BindingMap.toOrderedMap());
+ }
+
+ private static org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction
+ updateSetVlanIdAction(final org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction
+ .list.Instruction insn) {
+ if (insn.getInstruction() instanceof ApplyActionsCase applyActionsCase) {
+ final var applyActions = applyActionsCase.getApplyActions();
+ if (applyActions != null) {
+ final var actions = applyActions.getAction();
+ if (actions != null && !actions.isEmpty()) {
+ final int[] offset = { 0 };