Skip to content

Commit 0b13088

Browse files
committed
defines singleton list
1 parent 0138b7d commit 0b13088

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

streams/api/src/main/java/org/eclipse/microprofile/reactive/streams/ReactiveStreams.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.reactivestreams.Subscriber;
2626

2727
import java.util.Arrays;
28+
import java.util.Collections;
2829
import java.util.function.Supplier;
2930
import java.util.function.UnaryOperator;
3031
import java.util.stream.Stream;
@@ -59,7 +60,7 @@ public static <T> PublisherBuilder<T> fromPublisher(Publisher<? extends T> publi
5960
* @return A publisher builder that will emit the element.
6061
*/
6162
public static <T> PublisherBuilder<T> of(T t) {
62-
return new PublisherBuilder<>(new Stage.Of(Arrays.asList(t)));
63+
return new PublisherBuilder<>(new Stage.Of(Collections.singletonList(t)));
6364
}
6465

6566
/**

streams/tck/src/main/java/org/eclipse/microprofile/reactive/streams/tck/CancelStageVerification.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.testng.SkipException;
2626
import org.testng.annotations.Test;
2727

28-
import java.util.Arrays;
28+
import java.util.Collections;
2929
import java.util.List;
3030
import java.util.concurrent.CompletableFuture;
3131
import java.util.concurrent.CompletionStage;
@@ -54,7 +54,7 @@ public void cancel() {
5454

5555
@Override
5656
List<Object> reactiveStreamsTckVerifiers() {
57-
return Arrays.asList(new SubscriberVerification());
57+
return Collections.singletonList(new SubscriberVerification());
5858
}
5959

6060
public class SubscriberVerification extends StageSubscriberBlackboxVerification {

0 commit comments

Comments
 (0)