Skip to content

[ISSUE #10939] Validate missing Remoting ext fields before forwarding - #10940

Open
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-null-remoting-ext-fields
Open

[ISSUE #10939] Validate missing Remoting ext fields before forwarding#10940
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-null-remoting-ext-fields

Conversation

@Aias00

@Aias00 Aias00 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Returns the existing VERSION_NOT_SUPPORTED protocol response when a Proxy Remoting request has no extFields map, instead of dereferencing it and failing with a NullPointerException.

Test

  • mvn -pl proxy -Dtest=AbstractRemotingActivityTest test
  • Adds coverage for normal forwarding and SEND_MESSAGE_V2 requests with extFields == null.

Closes #10939.

Signed-off-by: liuhy <liuhongyu@apache.org>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.49%. Comparing base (293f588) to head (c99a669).

Files with missing lines Patch % Lines
...xy/remoting/activity/AbstractRemotingActivity.java 50.00% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Proxy Remoting forwarding NPEs when bname extFields are absent

3 participants