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

   ### 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
   
   Dubbo3.2.9  Dubbo3.3.2
   Jdk17
   
   ### Steps to reproduce this issue
   
   When a custom subclass of `RegistryConfig` is created with a simple class 
name different from 'RegistryConfig', it leads to an unexpected behavior where 
an `IllegalStateException` is thrown, reporting 'Registry not found:' along 
with the associated ID. This behavior indicates a bug because all subclasses of 
`RegistryConfig` should be recognized regardless of their simple names.
   
   code likes below:
   ```
     public  class CustomRegistryConfig extend RegistryConfig{
       //customize code
   }
   ```
   
   ### What you expected to happen
   
   When processing `CustomRegistryConfig`, it should be treated as an instance 
of the `RegistryConfig` class type rather than being handled specifically as 
the `CustomRegistryConfig` class. This ensures consistency with the expected 
type handling in the system.
   
   ### Anything else
   
   The error in the `AbstractConfigManager` class's `addConfig` method stems 
from its logic, which currently relies on the simple name of the provided 
config class. However, the correct approach should involve using the simple 
name of the parent class that is listed in the `supportedConfigTypes`. This 
ensures consistency and proper type handling within the configuration 
management system.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to