<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.7.6</li>
<li>Operating System version: linux</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">ServiceNameMapping publish config to config conter,it make config manger being confusion,how can i do to avoid this situation</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5662648/82404252-6692fb00-9a93-11ea-9b03-0c35fe64a0e0.png"><img src="https://user-images.githubusercontent.com/5662648/82404252-6692fb00-9a93-11ea-9b03-0c35fe64a0e0.png" alt="image" style="max-width: 100%;"></a></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/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: master</li>
<li>Operating System version: any</li>
<li>Java version: any</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">no steps</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    private void doExportUrlsFor1Protocol(ProtocolConfig protocolConfig, List&lt;URL&gt; registryURLs) {
    ......
    for (MethodConfig method : methods) {
         .....
         List&lt;ArgumentConfig&gt; arguments = method.getArguments();
         for (ArgumentConfig argument : arguments) {
                .....
                Method[] methods = interfaceClass.getMethods();
                    for (int i = 0; i &lt; methods.length; i++) {
                          String methodName = methods[i].getName();
                               if (methodName.equals(method.getName())) {
                                     Class&lt;?&gt;[] argtypes = methods[i].getParameterTypes();
                                      // one callback in the method
                                     1.  if (argument.getIndex() != -1){
                                              ......
                                              }else{
                                                     if (argclazz.getName().equals(argument.getType())) {
                                                           2. if (argument.getIndex() != -1 &amp;&amp; argument.getIndex() != j){
                                                    
                                                            }
                                                     }
                                              }
                               }
         }
    }

   }"><pre class="notranslate"><code class="notranslate">    private void doExportUrlsFor1Protocol(ProtocolConfig protocolConfig, List&lt;URL&gt; registryURLs) {
    ......
    for (MethodConfig method : methods) {
         .....
         List&lt;ArgumentConfig&gt; arguments = method.getArguments();
         for (ArgumentConfig argument : arguments) {
                .....
                Method[] methods = interfaceClass.getMethods();
                    for (int i = 0; i &lt; methods.length; i++) {
                          String methodName = methods[i].getName();
                               if (methodName.equals(method.getName())) {
                                     Class&lt;?&gt;[] argtypes = methods[i].getParameterTypes();
                                      // one callback in the method
                                     1.  if (argument.getIndex() != -1){
                                              ......
                                              }else{
                                                     if (argclazz.getName().equals(argument.getType())) {
                                                           2. if (argument.getIndex() != -1 &amp;&amp; argument.getIndex() != j){
                                                    
                                                            }
                                                     }
                                              }
                               }
         }
    }

   }
</code></pre></div>
<p dir="auto">上面第二个标记处的判断是否多余呢？因为此时 argument.getIndex() == -1，这个判断是肯定不会执行的，并且此时已经执行了appendParameters（map,argument）</p>
<p dir="auto">What do you expected from the above steps？<br>
remove above unnecessary code</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>