parent
627a699bd0
commit
929c5f6e68
|
@ -425,7 +425,7 @@ public class Streams {
|
|||
* @since 3.13.0
|
||||
*/
|
||||
@SafeVarargs // Creating a stream from an array is safe
|
||||
public static <T> Stream<T> of(T... values) {
|
||||
public static <T> Stream<T> of(final T... values) {
|
||||
return values == null ? Stream.empty() : Stream.of(values);
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ public class RandomUtilsTest {
|
|||
@Test
|
||||
public void testBoolean() {
|
||||
final boolean result = RandomUtils.nextBoolean();
|
||||
assertTrue(result == true || result == false);
|
||||
assertTrue(result || !result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -84,8 +84,8 @@ public class StreamsTest {
|
|||
|
||||
protected <T extends Throwable> FailableConsumer<String, T> asIntConsumer(final T pThrowable) {
|
||||
return s -> {
|
||||
final Integer i = Integer.valueOf(s);
|
||||
if (i.intValue() == 4) {
|
||||
final int i = Integer.parseInt(s);
|
||||
if (i == 4) {
|
||||
throw pThrowable;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -46,8 +46,8 @@ public class StreamsTest {
|
|||
|
||||
protected <T extends Throwable> FailableConsumer<String, T> asIntConsumer(final T pThrowable) {
|
||||
return s -> {
|
||||
final Integer i = Integer.valueOf(s);
|
||||
if (i.intValue() == 4) {
|
||||
final int i = Integer.parseInt(s);
|
||||
if (i == 4) {
|
||||
throw pThrowable;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue