mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Use diamond operator.
This commit is contained in:
@@ -107,7 +107,7 @@ public class TestUtils {
|
||||
public static double getMedian(Collection<? extends Number> samples) {
|
||||
int size = samples.size();
|
||||
if (size == 0) throw new IllegalArgumentException();
|
||||
List<Double> sorted = new ArrayList<Double>(size);
|
||||
List<Double> sorted = new ArrayList<>(size);
|
||||
for (Number n : samples) sorted.add(n.doubleValue());
|
||||
Collections.sort(sorted);
|
||||
if (size % 2 == 1) return sorted.get(size / 2);
|
||||
|
||||
Reference in New Issue
Block a user