Skip to content

Commit 5ecf9f9

Browse files
qweekyschimke
authored andcommitted
redundant condition (#394)
Condition 'metadata != null' is always 'true' when reached
1 parent 13035cd commit 5ecf9f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rsocket-core/src/main/java/io/rsocket/frame/FrameHeaderFlyweight.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static int encodeMetadata(
103103
typeAndFlags |= FLAGS_M;
104104
byteBuf.setShort(FRAME_TYPE_AND_FLAGS_FIELD_OFFSET, (short) typeAndFlags);
105105

106-
if (hasMetadataLengthField(frameType) && metadata != null) {
106+
if (hasMetadataLengthField(frameType)) {
107107
encodeLength(byteBuf, metadataOffset, metadataLength);
108108
length += FRAME_LENGTH_SIZE;
109109
}

0 commit comments

Comments
 (0)