dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ylylc (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] ylylc commented on issue #3835: java 1.8早期版本使用2.7以上dubbo 启动长
Date Tue, 09 Apr 2019 07:42:25 GMT
升级到,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
Mime
View raw message