You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "PengJingzhao (via GitHub)" <gi...@apache.org> on 2025/04/06 12:35:32 UTC

[I] [Bug] Hidden bugs in MetricsEventBus [dubbo]

PengJingzhao opened a new issue, #15295:
URL: https://github.com/apache/dubbo/issues/15295

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Java 3.3
   
   ### Steps to reproduce this issue
   
   While researching Dubbo's EventBus mechanism today, I discovered some hidden bugs in the code. Therefore, I am proposing fixes as follows:
   - No null-check for the event object itself, which may lead to a NullPointerException
   
   ![Image](https://github.com/user-attachments/assets/bd4bb1cc-29a5-4a03-95f0-a95868b80935)
   
   - No type validation using instanceof before performing type casting.
   
   ![Image](https://github.com/user-attachments/assets/fa5c6a27-1d2c-47dd-bd7c-537f925398fb)
   
   - tryInvoke is a public method and is called frequently, but it lacks a null-check for the runnable object.
   
   ![Image](https://github.com/user-attachments/assets/87d7786f-8a1b-448f-a786-ce5c2d5d3149)
   
   
   ### What you expected to happen
   
   Improve null-check operations and type validation. Of course, I am happy to submit a PR to complete this work.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Hidden bugs in MetricsEventBus [dubbo]

Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed issue #15295: [Bug] Hidden bugs in MetricsEventBus
URL: https://github.com/apache/dubbo/issues/15295


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org