DivyanshIITB opened a new pull request, #9268:
URL: https://github.com/apache/rocketmq/pull/9268
Key Changes:
- Removed duplicate operation: responseFuture.setResponseCommand(cmd); was
being called outside and inside the if condition.
It is now moved inside the conditional block where getInvokeCallback() !=
null.
- Enhanced maintainability: Eliminates unnecessary code while preserving the
intended behavior.
- No functional impact: The change ensures that setResponseCommand(cmd); is
executed only when required.
Why This Change?
- The previous implementation resulted in an unnecessary function call in
cases where getInvokeCallback() was null.
- This minor optimization improves performance by avoiding redundant method
execution.
Testing & Verification:
- Unit tests were run to verify that the behavior remains consistent.
- The RocketMQ remoting module continues to function as expected.
Fixes #2578
--
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]