Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / action / cases / OfToSalSetTpSrcCase.java
index 25e4f08dc247283bac1e015ac59428b5707de64f..eb908f8c7b0847960ec98409b5f71a4291134fed 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.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionResponseConvertorData;
@@ -26,10 +25,11 @@ public class OfToSalSetTpSrcCase extends ConvertorCase<SetTpSrcCase, Action, Act
     }
 
     @Override
-    public Optional<Action> process(@Nonnull final SetTpSrcCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
+    public Optional<Action> process(@NonNull final SetTpSrcCase source, final ActionResponseConvertorData data,
+            final ConvertorExecutor convertorExecutor) {
         return Optional.of(new SetTpSrcActionCaseBuilder()
                 .setSetTpSrcAction(new SetTpSrcActionBuilder()
-                        .setPort(new PortNumber(source.getSetTpSrcAction().getPort().getValue().intValue()))
+                        .setPort(new PortNumber(source.getSetTpSrcAction().getPort().getValue().toUint16()))
                         .setIpProtocol(data.getIpProtocol())
                         .build())
                 .build());