<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

ReferenceConfig throw IllegalStateException when check failed, but consumerModel is still registered.
return true;
    }
    @Override
    public int hashCode() {
        int hashCode = 1;
        for (Method method : getAttributedMethods()) {
            
            if ("getId".equals(method.getName())) {
                continue;
            }
            try {
                Object value = method.invoke(this);
                if (value != null) {
                    hashCode = 31 * hashCode + value.hashCode();
                }
            } catch (Exception ignored) {
                
            }
        }
        if (hashCode == 0) {
            hashCode = 1;
        }
        return hashCode;
    }
    private List<Method> getAttributedMethods() {
        Class<? extends AbstractConfig> cls = this.getClass();
        return attributedMethodCache.computeIfAbsent(cls, (key) -> computeAttributedMethods());
    }
    /**
     * compute attributed getter methods, subclass can override this method to add/remove attributed methods