f1amingo opened a new issue, #10546:
URL: https://github.com/apache/rocketmq/issues/10546
## 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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]