Resolve minor warnings/suggestions
This commit is contained in:
parent
010ed77345
commit
0023cb2521
|
@ -111,7 +111,8 @@ public class Util {
|
||||||
public static void sleep(long i) {
|
public static void sleep(long i) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(i);
|
Thread.sleep(i);
|
||||||
} catch (InterruptedException ie) {}
|
} catch (final InterruptedException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long todayInMillis() {
|
public static long todayInMillis() {
|
||||||
|
@ -186,7 +187,7 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Integer> indices = new HashSet<>(RANDOM_GENERATOR.ints(0, values.size()).distinct().limit(n).boxed().toList());
|
Set<Integer> indices = new HashSet<>(RANDOM_GENERATOR.ints(0, values.size()).distinct().limit(n).boxed().toList());
|
||||||
List<E> result = new ArrayList<E>(n);
|
List<E> result = new ArrayList<>(n);
|
||||||
for(int i = 0; i < values.size() && result.size() < n; i++) {
|
for(int i = 0; i < values.size() && result.size() < n; i++) {
|
||||||
if(indices.contains(i)) {
|
if(indices.contains(i)) {
|
||||||
result.add(values.get(i));
|
result.add(values.get(i));
|
||||||
|
|
Loading…
Reference in New Issue