Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
aloyszhang committed Jun 28, 2021
1 parent d45e1a7 commit 0f3eea1
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -281,12 +281,11 @@ public static long getEntryTimestamp( ByteBuf headersAndPayloadWithBrokerEntryMe
MessageImpl<byte[]> msg = (MessageImpl<byte[]>) RECYCLER.get();
try {
Commands.parseMessageMetadata(headersAndPayloadWithBrokerEntryMetadata, msg.msgMetadata);
entryTimestamp = msg.getPublishTime();
return msg.getPublishTime();
} finally {
// make sure msg can be recycled
msg.recycle();
}
return entryTimestamp;
}

public static boolean isEntryExpired(int messageTTLInSeconds, long entryTimestamp) {
Expand Down

0 comments on commit 0f3eea1

Please sign in to comment.