<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/incubator-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/incubator-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: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Can transfer attachment from http headers to RpcContext</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>
<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: master</li>
<li>Operating System version: mac</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>我在dubbo-admin 上配置一条动态配置如下：<br>
configVersion: v2.7<br>
enabled: true<br>
configs:</li>
</ol>
<ul dir="auto">
<li>side: consumer<br>
addresses:
<ul dir="auto">
<li>0.0.0.0<br>
parameters:<br>
timeout: 6000<br>
cluster: failback</li>
</ul>
</li>
</ul>
<ol start="2" dir="auto">
<li>启动org.apache.dubbo.demo.provider.Application.ProviderConfiguration, 抛空指针。</li>
<li>跟踪代码，RegistryProtocol.notify(List urls)内部调用，doOverrideIfNecessary。<br>
该方法会判断：当前注册URL 与新的URL不同，会重新导入<br>
if (!currentUrl.equals(newUrl)) {<br>
RegistryProtocol.this.reExport(originInvoker, newUrl);<br>
logger.info("exported provider url changed, origin url: " + originUrl +<br>
", old export url: " + currentUrl + ", new export url: " + newUrl);<br>
}</li>
</ol>
<p dir="auto">在doReExport 方法下,会调用<br>
logger.info("Try to unregister old url: " + oldProviderUrl);<br>
registry.reExportUnregister(oldProviderUrl);<br>
但是这个oldProviderUrl is null, 因为在注册的时候是从<br>
ExporterChangeableWrapper exporter = (ExporterChangeableWrapper) bounds.get(key)； 获取。<br>
但是ExporterChangeableWrapper 构造时，但是构造方法：<br>
public ExporterChangeableWrapper(Exporter exporter, Invoker originInvoker) {<br>
this.exporter = exporter;<br>
this.originInvoker = originInvoker;<br>
}<br>
所以registerUrl is null。<br>
在AbstractRegistry.unregister()上有<br>
public void unregister(URL url) {<br>
if (url == null) {<br>
throw new IllegalArgumentException("unregister url == null");<br>
}<br>
if (logger.isInfoEnabled()) {<br>
logger.info("Unregister: " + url);<br>
}<br>
registered.remove(url);<br>
}<br>
抛出参数异常。</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>