Cleanup boolean literals
[bgpcep.git] / bgp / parser-spi / src / main / java / org / opendaylight / protocol / bgp / parser / spi / AttributeUtil.java
index f919a0d17bd78335bb382deb540b3d80c29dc6b3..ae7907937d8fd94bc1de610a1193ed15aa642331 100644 (file)
@@ -10,15 +10,13 @@ package org.opendaylight.protocol.bgp.parser.spi;
 import io.netty.buffer.ByteBuf;
 
 public final class AttributeUtil {
-
-    private static final int MAX_ATTR_LENGTH_FOR_SINGLE_BYTE = 255;
-
     public static final int OPTIONAL = 128;
     public static final int TRANSITIVE = 64;
     public static final int PARTIAL = 32;
     private static final int EXTENDED = 16;
 
     private AttributeUtil() {
+        // Hidden on purpose
     }
 
     /**
@@ -32,7 +30,7 @@ public final class AttributeUtil {
      */
     public static void formatAttribute(final int flags, final int type, final ByteBuf value, final ByteBuf buffer) {
         final int length = value.writerIndex();
-        final boolean extended = length > MAX_ATTR_LENGTH_FOR_SINGLE_BYTE ? true : false;
+        final boolean extended = length > 255;
         buffer.writeByte(extended ? flags | EXTENDED : flags);
         buffer.writeByte(type);
         if (extended) {