Background
The rejectRequest() method in NettyRequestProcessor interface currently requires every implementation to provide its own override. However, 20+ implementations across the codebase simply return false, with only SendMessageProcessor and PullMessageProcessor containing actual logic.
Motivation
This boilerplate pattern creates unnecessary code duplication and increases the risk of forgetting to implement rejectRequest() when adding a new processor.
Proposed Change
Convert boolean rejectRequest() to default boolean rejectRequest() { return false; } in the interface, and remove all redundant return false overrides.
This is a zero-risk, pure cleanup change:
- Semantically equivalent (all removed overrides already return false)
- Existing overrides with real logic (Send/Pull) remain unaffected
- Compatible with Java 8+ (project target)
Background
The
rejectRequest()method inNettyRequestProcessorinterface currently requires every implementation to provide its own override. However, 20+ implementations across the codebase simplyreturn false, with onlySendMessageProcessorandPullMessageProcessorcontaining actual logic.Motivation
This boilerplate pattern creates unnecessary code duplication and increases the risk of forgetting to implement
rejectRequest()when adding a new processor.Proposed Change
Convert
boolean rejectRequest()todefault boolean rejectRequest() { return false; }in the interface, and remove all redundantreturn falseoverrides.This is a zero-risk, pure cleanup change: