[ISSUE #10939] Validate missing Remoting ext fields before forwarding - #10940
[ISSUE #10939] Validate missing Remoting ext fields before forwarding#10940Aias00 wants to merge 1 commit into
Conversation
Signed-off-by: liuhy <liuhongyu@apache.org>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10940 +/- ##
=============================================
- Coverage 48.62% 48.49% -0.14%
+ Complexity 13692 13649 -43
=============================================
Files 1381 1381
Lines 101464 101464
Branches 13187 13187
=============================================
- Hits 49337 49205 -132
- Misses 46142 46243 +101
- Partials 5985 6016 +31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Good null safety fix for validating Remoting ext fields before accessing them.
The change adds null checks for request.getExtFields() before calling .get() on it, preventing NullPointerException when a malformed request without ext fields is received. This is a defensive fix that improves robustness against invalid client requests.
The fix is applied to both code paths (SEND_MESSAGE_V2 and other request types), and the test coverage validates both scenarios with null ext fields.
LGTM.
Automated review by github-manager-bot
What does this PR do?
Returns the existing
VERSION_NOT_SUPPORTEDprotocol response when a Proxy Remoting request has noextFieldsmap, instead of dereferencing it and failing with aNullPointerException.Test
mvn -pl proxy -Dtest=AbstractRemotingActivityTest testSEND_MESSAGE_V2requests withextFields == null.Closes #10939.