summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-11-27 07:50:49 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-11-27 08:05:50 +0100
commit826e9fd8de53fdf7bfe3a408d6ecba02e4359c7e (patch)
treeb426cf15450e109a97793e7d096216dafe644074 /lisp/lisp2vpp
parentfc838c481e6f588906f6282ee1891b4b98ab1779 (diff)
Remove unnecessary boxing and unboxing
Change-Id: I9f7cf7d7ecb97d7da449dac679f2d15438ac4970 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
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));
}