RockteMQ-AI commented on issue #10939:
URL: https://github.com/apache/rocketmq/issues/10939#issuecomment-5370270385

   Hi @Aias00, thanks for reporting this!
   
   I've analyzed this issue against the codebase and can confirm this appears 
to be a **real bug**.
   
   **Root Cause:** AbstractRemotingActivity.request() calls 
request.getExtFields().get(...) at lines 68 and 74 without checking whether 
getExtFields() returns null. A valid decoded RemotingCommand can have a null 
extFields map, causing a NullPointerException instead of the intended 
VERSION_NOT_SUPPORTED response.
   **Affected Files:** 
proxy/src/main/java/org/apache/rocketmq/proxy/remoting/activity/AbstractRemotingActivity.java,
 
proxy/src/test/java/org/apache/rocketmq/proxy/remoting/activity/AbstractRemotingActivityTest.java
   
   **Analysis:** RemotingCommand decoding leaves extFields null when no 
extension fields are present (e.g., RocketMQ protocol with extFieldsLength == 0 
or JSON without the property). The proxy's shared request() helper treats 
missing bname the same as a null extFields lookup, so it should guard the map 
before reading.
   
   I'll prepare a fix spec and work on a PR. The community is welcome to 
provide feedback on the approach before implementation.
   
   ---
   🤖 *Automated issue analysis by github-manager*


-- 
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]

Reply via email to