zhaoyunxing92 commented on issue #10419:
URL: https://github.com/apache/dubbo/issues/10419#issuecomment-1208075564

   主要是`AbstractConfig#equals`方法没有看`parameters`的参数
   
https://github.com/apache/dubbo/blob/3.0/dubbo-common/src/main/java/org/apache/dubbo/config/context/AbstractConfigManager.java#L161-L167
   ```java
    if (!(config instanceof ReferenceConfigBase || config instanceof 
ServiceConfigBase)) {
               for (AbstractConfig value : configsMap.values()) {
                   if (value.equals(config)) {
                       return (T) value;
                   }
               }
           }
   ```
   
   
[AbstractConfig#equals](https://github.com/apache/dubbo/blob/3.0/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java#L959-L983)
 方法列表没有`getParameters()`
   ```java
   public boolean equals(Object obj) {
           if (obj == null || obj.getClass() != this.getClass()) {
               return false;
           }
           if (obj == this) {
               return true;
           }
   
           for (Method method : getAttributedMethods()) {
               // ignore compare 'id' value
               if ("getId".equals(method.getName())) {
                   continue;
               }
               try {
                   Object value1 = method.invoke(this);
                   Object value2 = method.invoke(obj);
                   if (!Objects.equals(value1, value2)) {
                       return false;
                   }
               } catch (Exception e) {
                   throw new IllegalStateException("compare config instances 
failed", e);
               }
           }
           return true;
       }
   ```
   
[MethodUtils.isGetter](https://github.com/apache/dubbo/blob/3.0/dubbo-common/src/main/java/org/apache/dubbo/common/utils/MethodUtils.java#L77)判断返回类型是Map的方法不是get


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