<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.2</li>
<li>Operating System version:Windows10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>同一个微服务多个类引用同样的dubbo服务</li>
<li>每个类的reference除了version和group一样之外,其它属性均有不一样的配置</li>
<li>项目运行起来后有些类的此dubbo服务reference注解属性不起作用</li>
</ol>
<p dir="auto">我看了源码,是这里的问题:<br>
/**<br>
* Generate a cache key of {<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/link/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/link">@link</a> ReferenceBean}<br>
*<br>
* <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/param/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/param">@param</a> reference {<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/link/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/link">@link</a> Reference}<br>
* <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/param/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/param">@param</a> beanClass {<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/link/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/link">@link</a> Class}<br>
* <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/return/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/return">@return</a><br>
*/<br>
private String generateReferenceBeanCacheKey(Reference reference, Class&lt;?&gt; beanClass) {</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    String interfaceName = resolveInterfaceName(reference, beanClass);

    String key = reference.url() + &quot;/&quot; + interfaceName +
            &quot;/&quot; + reference.version() +
            &quot;/&quot; + reference.group();

    Environment environment = applicationContext.getEnvironment();

    key = environment.resolvePlaceholders(key);

    return key;

}"><pre class="notranslate"><code class="notranslate">    String interfaceName = resolveInterfaceName(reference, beanClass);

    String key = reference.url() + "/" + interfaceName +
            "/" + reference.version() +
            "/" + reference.group();

    Environment environment = applicationContext.getEnvironment();

    key = environment.resolvePlaceholders(key);

    return key;

}
</code></pre></div>
<p dir="auto">这里会缓存dubbo service,但是key应该由所有reference属性组成才对</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.6-SNAPSHOT</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Looks like there are some potential code issues in two files: a collection or map whose contents are never queried or accessed is useless.</p>
<p dir="auto"><a href="https://github.com/apache/dubbo/blob/master/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java#L111">https://github.com/apache/dubbo/blob/master/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java#L111</a><br>
<a href="https://github.com/apache/dubbo/blob/master/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java#L211">https://github.com/apache/dubbo/blob/master/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/JdkCompiler.java#L211</a></p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Remove them if it can be confirmed as unless</p>