From: Michal Cmarada Date: Thu, 28 Jun 2018 07:39:52 +0000 (+0200) Subject: fix Cast one of the operands to a long bug X-Git-Tag: v1.18.07-RC1~25 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=48e539a6fc5c0cb9a648081afcf13c1916086e7d;p=hc2vpp.git fix Cast one of the operands to a long bug both of operands are int type which can cause loss of data. This changes the types of operands to long Change-Id: Ie162d52b1f853c0d83d51c8871af42a597b93386 Signed-off-by: Michal Cmarada --- diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java index 8117d4d91..6952c1538 100644 --- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java +++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java @@ -251,9 +251,9 @@ public class PolicyReadRequest extends JVppRequest })); } - private Segment parseSrv6Sid(final int i, final Srv6Sid srv6Sid) { + private Segment parseSrv6Sid(final long i, final Srv6Sid srv6Sid) { // shifting index by 1 so it matches original indexing - long index = i + 1; + long index = i + 1L; SegmentBuilder builder = new SegmentBuilder().setKey(new SegmentKey(index)).setState( new org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918.segment.properties.StateBuilder() .setIndex(index)