Alluxio / Community

New Contributor Tasks for Alluxio
20 stars 38 forks source link

[SMALLFIX] Java 8 improvement: replace collections.sort() with list.sort in /alluxio/core/client/fs/src/main/java/alluxio/client/block/policy/DeterministicHashPolicy.java#getWorker #477

Closed newnius closed 5 years ago

newnius commented 5 years ago

Change

    Collections.sort(workerInfos, (o1, o2)
            -> o1.getNetAddress().toString().compareToIgnoreCase(o2.getNetAddress().toString()));

to

    workerInfos.sort((o1, o2)
            -> o1.getNetAddress().toString().compareToIgnoreCase(o2.getNetAddress().toString()));
cjy97 commented 5 years ago

Please check the new submission, thanks.