summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp')
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
index 42c41ed93..bb960fe92 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java
@@ -116,8 +116,8 @@ public class InterfaceCustomizer
final String interfaceRef = interfaceContext.getName(details.swIfIndex, ctx.getMappingContext());
- builder.setPriority(Byte.valueOf(details.priority).shortValue());
- builder.setWeight(Byte.valueOf(details.weight).shortValue());
+ builder.setPriority((short) Byte.toUnsignedInt(details.priority));
+ builder.setWeight((short) Byte.toUnsignedInt(details.weight));
builder.setInterfaceRef(interfaceRef);
builder.setKey(new InterfaceKey(interfaceRef));
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
index 2190ddf6b..7d49a8d30 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java
@@ -110,7 +110,7 @@ public class LocalMappingCustomizer
//Requesting for specific mapping dump,only from local mappings with specified eid/vni/eid type
final MappingsDumpParams dumpParams = new MappingsDumpParams.MappingsDumpParamsBuilder()
.setEidSet(QuantityType.SPECIFIC)
- .setVni(Long.valueOf(vni).intValue())
+ .setVni((int) vni)
.setEid(getEidAsByteArray(eid))
.setEidType(getEidType(eid))
.setPrefixLength(getPrefixLength(eid))
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
index 0d9aec5fb..4f497c350 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java
@@ -71,7 +71,7 @@ public class VniTableCustomizer extends CheckedLispCustomizer
}
private static VniTableKey detailsToKey(final OneEidTableVniDetails lispEidTableMapDetails) {
- return new VniTableKey(Integer.valueOf(lispEidTableMapDetails.vni).longValue());
+ return new VniTableKey(Integer.toUnsignedLong(lispEidTableMapDetails.vni));
}