Fix most bgp-parser-spi checkstyle violations
[bgpcep.git] / bgp / parser-spi / src / main / java / org / opendaylight / protocol / bgp / parser / spi / AttributeUtil.java
index 1f28e38df4b2c7a57e789957565fb9512f33d743..bb33c980dda1f849b717d695b2b3fa1e320a1a42 100644 (file)
@@ -26,15 +26,15 @@ public final class AttributeUtil {
      * Adds header to attribute value. If the length of the attribute value exceeds one-byte length field,
      * set EXTENDED bit and write length as 2B field.
      *
-     * @param flags
+     * @param flags attribute flags
      * @param type of the attribute
      * @param value attribute value
      * @param buffer ByteBuf where the attribute will be copied with its header
      */
     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;
-        buffer.writeByte((extended) ? (flags | EXTENDED) : flags);
+        final boolean extended = length > MAX_ATTR_LENGTH_FOR_SINGLE_BYTE ? true : false;
+        buffer.writeByte(extended ? flags | EXTENDED : flags);
         buffer.writeByte(type);
         if (extended) {
             buffer.writeShort(length);