<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.3</li>
<li>Operating System version: MAC OX 10.14.5</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">Use GenericService by API,  assign the version is 1.0.0.test.qa.st<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9245774/62794432-aab99e00-bb06-11e9-9422-8317c64374b1.png"><img src="https://user-images.githubusercontent.com/9245774/62794432-aab99e00-bb06-11e9-9422-8317c64374b1.png" alt="image" style="max-width: 100%;"></a></p>
</li>
<li>
<p dir="auto">breakpoint at DubboInvoker.doInvoke</p>
</li>
<li>
<p dir="auto">check the DubboInvoker.version = 0.0.0<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9245774/62794513-e2284a80-bb06-11e9-878a-ab54d420d57c.png"><img src="https://user-images.githubusercontent.com/9245774/62794513-e2284a80-bb06-11e9-878a-ab54d420d57c.png" alt="image" style="max-width: 100%;"></a></p>
</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">In the instance of DubboInvoker，the version should be  1.0.0.test.qa.st</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">In the instance of DubboInvoker，the version’s value actully is  default value,0.0.0</p>
<h3 dir="auto">Cause</h3>
<p dir="auto">this method : "ClusterUtils.mergeUrl" at line 87 ,remove the version key, so lost the version's value</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"> 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</li>
<li>Operating System version: any</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class DubboTest {

    public static void main(String[] args) {
        RpcContext.getContext().getAttachments().put(&quot;a&quot;, &quot;b&quot;);

        System.out.println(&quot;before&quot;);
        for (Map.Entry&lt;String, String&gt; entry : RpcContext.getContext().getAttachments().entrySet()) {
            System.out.println(entry.getKey() + &quot;==&gt;&quot; + entry.getValue());
        }

        System.out.println(&quot;after&quot;);
    }
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">DubboTest</span> {

    <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
        <span class="pl-smi">RpcContext</span>.<span class="pl-en">getContext</span>().<span class="pl-en">getAttachments</span>().<span class="pl-en">put</span>(<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>);

        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"before"</span>);
        <span class="pl-k">for</span> (<span class="pl-smi">Map</span>.<span class="pl-smi">Entry</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">String</span>&gt; <span class="pl-s1">entry</span> : <span class="pl-smi">RpcContext</span>.<span class="pl-en">getContext</span>().<span class="pl-en">getAttachments</span>().<span class="pl-en">entrySet</span>()) {
            <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">entry</span>.<span class="pl-en">getKey</span>() + <span class="pl-s">"==&gt;"</span> + <span class="pl-s1">entry</span>.<span class="pl-en">getValue</span>());
        }

        <span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"after"</span>);
    }
}</pre></div>
<p dir="auto">execute result:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11530760/82122989-855e6c80-97c9-11ea-8333-9437b469b0e0.png"><img src="https://user-images.githubusercontent.com/11530760/82122989-855e6c80-97c9-11ea-8333-9437b469b0e0.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">the reason is <code class="notranslate">ObjectToStringMap</code> implements has serious problem.</p>
<p dir="auto">I will make a PR to fix this</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>