Take advantage of {Integer,Long}.BYTES
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / StrictBGPPeerRegistry.java
index 2d2fb8f8bc39951ac69ccd5820f78cd297cdad17..598eec38e4ac10076d216e05b1765c9028a15716 100644 (file)
@@ -234,8 +234,7 @@ public final class StrictBGPPeerRegistry implements BGPPeerRegistry {
     }
 
     private static byte[] serializeAs4BytesCapability(final As4BytesCapability as4Capability) {
-        final ByteBuf buffer = Unpooled.buffer(1 /*CODE*/ + 1 /*LENGTH*/
-                + Integer.SIZE / Byte.SIZE /*4 byte value*/);
+        final ByteBuf buffer = Unpooled.buffer(1 /*CODE*/ + 1 /*LENGTH*/ + Integer.BYTES /*4 byte value*/);
         final As4CapabilityHandler serializer = new As4CapabilityHandler();
         serializer.serializeCapability(new CParametersBuilder().setAs4BytesCapability(as4Capability).build(), buffer);
         return buffer.array();