提交 f4a48c23 编写于 作者: C chengxiang li 提交者: Stephan Ewen

[FLINK-2596] Remove non-transitive comparator in random sampler test.

This closes #1080
上级 7364ce18
......@@ -372,12 +372,7 @@ public class RandomSamplerTest {
* Some sample result may not order by the input sequence, we should make it in order to do K-S test.
*/
private double[] transferFromListToArrayWithOrder(List<Double> list) {
Collections.sort(list, new Comparator<Double>() {
@Override
public int compare(Double o1, Double o2) {
return o1 - o2 >= 0 ? 1 : -1;
}
});
Collections.sort(list);
double[] result = new double[list.size()];
for (int i = 0; i < list.size(); i++) {
result[i] = list.get(i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册