From: Robert Varga Date: Sat, 4 Jan 2020 15:15:26 +0000 (+0100) Subject: Remove superfluous constants X-Git-Tag: release/magnesium~46 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=1e58b3a1544c4f0efff5d5d6a246707da90ee834;p=bgpcep.git Remove superfluous constants java.lang.{Byte,Short,Integer,Long,Float} define a BYTES constant since Java 8, use that instead of brewing our own. Change-Id: If7a8e75c123fef7d79172f22dadb01012de4b1b5 Signed-off-by: Robert Varga --- diff --git a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/PathIdUtil.java b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/PathIdUtil.java index 081226d3fe..950a8535a7 100644 --- a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/PathIdUtil.java +++ b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/PathIdUtil.java @@ -56,7 +56,7 @@ public final class PathIdUtil { * @return Decoded PathId. */ public static PathId readPathId(final ByteBuf buffer) { - Preconditions.checkArgument(buffer != null && buffer.isReadable(ByteBufWriteUtil.INT_BYTES_LENGTH)); + Preconditions.checkArgument(buffer != null && buffer.isReadable(Integer.BYTES)); return new PathId(ByteBufUtils.readUint32(buffer)); } diff --git a/bmp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/StatisticsReportHandler.java b/bmp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/StatisticsReportHandler.java index fc5340de15..ba9282873e 100644 --- a/bmp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/StatisticsReportHandler.java +++ b/bmp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/StatisticsReportHandler.java @@ -5,10 +5,8 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.protocol.bmp.parser.message; -import static org.opendaylight.protocol.util.ByteBufWriteUtil.INT_BYTES_LENGTH; import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt; import com.google.common.base.Preconditions; @@ -62,7 +60,7 @@ public class StatisticsReportHandler extends AbstractBmpPerPeerMessageParser