From d2f203522c5384ad411bc9dad38c5f87b0e63abd Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 30 May 2016 12:45:00 +0200 Subject: Move byteToBoolean to TranslateUtils Change-Id: I7a8142bc2df7d566bc3edde7ceb42eb6b8815852 Signed-off-by: Marek Gradzki --- .../v3po/translate/v3po/vppstate/BridgeDomainCustomizer.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'v3po/v3po2vpp/src/main/java/io') diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/BridgeDomainCustomizer.java index ac16c610f..dabd73ed9 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/BridgeDomainCustomizer.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/BridgeDomainCustomizer.java @@ -16,6 +16,8 @@ package io.fd.honeycomb.v3po.translate.v3po.vppstate; +import static io.fd.honeycomb.v3po.translate.v3po.util.TranslateUtils.byteToBoolean; + import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; @@ -138,16 +140,6 @@ public final class BridgeDomainCustomizer extends FutureJVppCustomizer } } - // TODO move to utils - private static Boolean byteToBoolean(final byte aByte) { - if (aByte == 0) { - return Boolean.FALSE; - } else if (aByte == 1) { - return Boolean.TRUE; - } - throw new IllegalArgumentException(String.format("0 or 1 was expected but was %d", aByte)); - } - private void logBridgeDomainDetails(final BridgeDomainDetails bridgeDomainDetails) { LOG.debug("bridgeDomainDetails={}", bridgeDomainDetails); if (bridgeDomainDetails != null) { -- cgit 1.2.3-korg