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

### Environment

* Dubbo version: Latest
* Operating System version: win10
* Java version: 1.8

### Steps to reproduce this issue

```java
private static <T> Invoker<T> buildInvokerChain(final Invoker<T> invoker, 
String key, String group) {
        Invoker<T> last = invoker;
        List<Filter> filters = 
ExtensionLoader.getExtensionLoader(Filter.class).getActivateExtension(invoker.getUrl(),
 key, group);
        if (!filters.isEmpty()) {
            for (int i = filters.size() - 1; i >= 0; i--) {
                final Filter filter = filters.get(i);
                final Invoker<T> next = last;
                last = new Invoker<T>() {

                   ...........
                    @Override
                    public Result invoke(Invocation invocation) throws 
RpcException {
                        return filter.invoke(next, invocation);
                    }
                   ...........
                };
            }
        }
        return last;
    }
```
it will creates the same number of the **anonymous Invoker class** as **filters 
size** when refer() or export(...) every time, it's a linked structure

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

use one **anonymous Invoker class** to instead of it 

use one **for** call to instead of **linked** call

### Actual Result

NONE


[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/2726 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to