You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "ylylc (GitHub)" <gi...@apache.org> on 2019/04/09 07:42:25 UTC

[GitHub] [incubator-dubbo] ylylc commented on issue #3835: java 1.8早期版本使用2.7以上dubbo 启动长

升级到,jdk版本后问题解决,但是这个对于使用1.8早期版本及之前版本的同学是个坑。CopyOnWriteArrayList 在此之前是不支持Collects.sorts。
```
 public void addRouters(List<Router> routers) {
        List<Router> newRouters = new CopyOnWriteArrayList<>();
        newRouters.addAll(builtinRouters);
        newRouters.addAll(routers);
        CollectionUtils.sort(routers);//这里使用 Collections.sort()
        this.routers = newRouters;
    }
```







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