OPNFLWPLUG-1071 : Removal of javax.annotation.Nonnnull and replacement of javax.annot...
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / action / cases / OfToSalOutputActionCase.java
index f24ff5fb01e69544783bd72e7f4d4155f399b2d5..8df17a3bfa2014894eabcf1b5b8de0933b354b5b 100644 (file)
@@ -5,11 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.cases;
 
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
@@ -23,6 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortNumberUni;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.OutputActionCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.output.action._case.OutputAction;
+import org.opendaylight.yangtools.yang.common.Uint16;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,22 +34,23 @@ public class OfToSalOutputActionCase extends ConvertorCase<OutputActionCase, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final OutputActionCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@NonNull final OutputActionCase source, final ActionResponseConvertorData data,
+            final ConvertorExecutor convertorExecutor) {
         final OpenflowVersion ofVersion = OpenflowVersion.get(data.getVersion());
 
         OutputActionBuilder outputAction = new OutputActionBuilder();
         OutputAction outputActionFromOF = source.getOutputAction();
 
         if (outputActionFromOF.getPort() != null) {
-            PortNumberUni protocolAgnosticPort = OpenflowPortsUtil.getProtocolAgnosticPort(ofVersion, outputActionFromOF.getPort().getValue());
+            PortNumberUni protocolAgnosticPort = OpenflowPortsUtil.getProtocolAgnosticPort(ofVersion,
+                    outputActionFromOF.getPort().getValue());
             String portNumberAsString = OpenflowPortsUtil.portNumberToString(protocolAgnosticPort);
             outputAction.setOutputNodeConnector(new Uri(portNumberAsString));
         } else {
             LOG.error("Provided action is not OF Output action, no associated port found!");
         }
 
-        Integer maxLength = outputActionFromOF.getMaxLength();
-
+        Uint16 maxLength = outputActionFromOF.getMaxLength();
         if (maxLength != null) {
             outputAction.setMaxLength(maxLength);
         } else {