Bump upstreams for 2022.09 Chlorine
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / action / cases / SalToOfSetNwDstActionCase.java
index d9d58185fc54e944fc2ec8c514f6d81236224422..b3a3c54783e2f152a2a179f0f40f565204a04985 100644 (file)
@@ -5,14 +5,13 @@
  * 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.openflow.md.core.sal.convertor.action.cases;
 
 import com.google.common.base.Splitter;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionConvertorData;
@@ -45,19 +44,19 @@ public class SalToOfSetNwDstActionCase extends ConvertorCase<SetNwDstActionCase,
         super(SetNwDstActionCase.class, true, OFConstants.OFP_VERSION_1_3);
     }
 
-    @Nonnull
+    @NonNull
     @Override
-    public Optional<Action> process(@Nonnull final SetNwDstActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@NonNull final SetNwDstActionCase source, final ActionConvertorData data,
+            ConvertorExecutor convertorExecutor) {
         final ActionBuilder builder = new ActionBuilder();
         final Address address = source.getSetNwDstAction().getAddress();
 
         if (address instanceof Ipv4) {
             Iterable<String> addressParts = PREFIX_SPLITTER.split(((Ipv4) address).getIpv4Address().getValue());
             Ipv4Address result = new Ipv4Address(addressParts.iterator().next());
-            List<MatchEntry> matchEntriesList = new ArrayList<>();
             MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
-            matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
-            matchEntryBuilder.setOxmMatchField(Ipv4Dst.class);
+            matchEntryBuilder.setOxmClass(OpenflowBasicClass.VALUE);
+            matchEntryBuilder.setOxmMatchField(Ipv4Dst.VALUE);
 
             Ipv4DstCaseBuilder ipv4DstCaseBuilder = new Ipv4DstCaseBuilder();
             Ipv4DstBuilder ipv4DstBuilder = new Ipv4DstBuilder();
@@ -68,6 +67,8 @@ public class SalToOfSetNwDstActionCase extends ConvertorCase<SetNwDstActionCase,
 
             matchEntryBuilder.setHasMask(false);
             matchEntryBuilder.setMatchEntryValue(ipv4DstCaseBuilder.build());
+
+            List<MatchEntry> matchEntriesList = new ArrayList<>();
             matchEntriesList.add(matchEntryBuilder.build());
 
             SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
@@ -78,10 +79,9 @@ public class SalToOfSetNwDstActionCase extends ConvertorCase<SetNwDstActionCase,
         } else if (address instanceof Ipv6) {
             Iterable<String> addressParts = PREFIX_SPLITTER.split(((Ipv6) address).getIpv6Address().getValue());
             Ipv6Address result = new Ipv6Address(addressParts.iterator().next());
-            List<MatchEntry> matchEntriesList = new ArrayList<>();
             MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
-            matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
-            matchEntryBuilder.setOxmMatchField(Ipv6Dst.class);
+            matchEntryBuilder.setOxmClass(OpenflowBasicClass.VALUE);
+            matchEntryBuilder.setOxmMatchField(Ipv6Dst.VALUE);
 
             Ipv6DstCaseBuilder ipv6DstCaseBuilder = new Ipv6DstCaseBuilder();
             Ipv6DstBuilder ipv6DstBuilder = new Ipv6DstBuilder();
@@ -92,6 +92,8 @@ public class SalToOfSetNwDstActionCase extends ConvertorCase<SetNwDstActionCase,
 
             matchEntryBuilder.setHasMask(false);
             matchEntryBuilder.setMatchEntryValue(ipv6DstCaseBuilder.build());
+
+            List<MatchEntry> matchEntriesList = new ArrayList<>();
             matchEntriesList.add(matchEntryBuilder.build());
 
             SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();