From 5839b2b924e656f048ce0b7daf5ef14cd5ec8faa Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 6 Aug 2018 09:31:52 +0200 Subject: sonar: remove unnecessary boxing in lisp module Change-Id: I62353ec0bbbe360a1757fa3eff3262e47180138e Signed-off-by: Marek Gradzki --- .../java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java index 18eaef063..4bdea7e03 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VrfSubtableCustomizer.java @@ -87,7 +87,7 @@ public class VrfSubtableCustomizer extends FutureJVppCustomizer .collect(Collectors.toList()); if (details.size() == 1) { final OneEidTableMapDetails detail = details.get(0); - builder.setTableId(Integer.valueOf(detail.dpTable).longValue()); + builder.setTableId(Integer.toUnsignedLong(detail.dpTable)); LOG.debug("Attributes for {} successfully loaded", id); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java index 96ab9d3b0..72b70354b 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/RemoteMappingCustomizer.java @@ -155,7 +155,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer return remoteLocator; }).toArray(OneRemoteLocator[]::new); - request.rlocNum = Integer.valueOf(rlocs.getLocator().size()).byteValue(); + request.rlocNum = (byte) rlocs.getLocator().size(); } getReply(getFutureJVpp().oneAddDelRemoteMapping(request).toCompletableFuture()); -- cgit 1.2.3-korg