diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-06-27 17:20:16 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-06-28 10:12:44 +0000 |
commit | 9be7e401741afc770512b73752c40b5bd09fdbd5 (patch) | |
tree | 34f84abc30f02b1c7009e81e26ec961abf566be4 | |
parent | bb2c610248c26054156a03f3e7c062b7e9a1dfd0 (diff) |
lisp: fix sonar issues in SubtableDumpParams
Change-Id: Ic53723df24e8c373fab3f2a63d21de39c1fac156
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
(cherry picked from commit 801ed98e2f6b6c3f82876e726aa120482210c427)
(cherry picked from commit a03753e7f4551b2a24ed17e9c72bc51605c186ab)
-rw-r--r-- | lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/dump/executor/params/SubtableDumpParams.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/dump/executor/params/SubtableDumpParams.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/dump/executor/params/SubtableDumpParams.java index d80ffd39c..8cef57845 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/dump/executor/params/SubtableDumpParams.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/dump/executor/params/SubtableDumpParams.java @@ -16,8 +16,7 @@ package io.fd.hc2vpp.lisp.translate.read.dump.executor.params; -import static com.google.common.base.Preconditions.checkNotNull; - +import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev171013.eid.table.grouping.eid.table.vni.table.BridgeDomainSubtable; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.lisp.rev171013.eid.table.grouping.eid.table.vni.table.VrfSubtable; @@ -50,7 +49,7 @@ public final class SubtableDumpParams { private final int value; - private MapLevel(final int value) { + MapLevel(final int value) { this.value = value; } @@ -59,12 +58,12 @@ public final class SubtableDumpParams { } } - public static final class SubtableDumpParamsBuilder { + public static final class SubtableDumpParamsBuilder implements ByteDataTranslator { private byte isL2; public SubtableDumpParamsBuilder setL2(@Nonnull final MapLevel mapLevel) { - isL2 = Integer.valueOf(checkNotNull(mapLevel, "Cannot set null map level").getValue()).byteValue(); + isL2 = booleanToByte(MapLevel.L2.equals(mapLevel)); return this; } |