Skip to content

Commit c0df7ae

Browse files
committed
use graphql assert
1 parent 74ffc8f commit c0df7ae

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/main/java/graphql/execution/reactive/NonBlockingMutexExecutor.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.concurrent.Executor;
77
import java.util.concurrent.atomic.AtomicReference;
88

9-
import static java.util.Objects.requireNonNull;
9+
import static graphql.Assert.assertNotNull;
1010

1111

1212
/**
@@ -37,7 +37,7 @@ class NonBlockingMutexExecutor implements Executor {
3737

3838
@Override
3939
public void execute(final Runnable command) {
40-
final RunNode newNode = new RunNode(requireNonNull(command, "Runnable must not be null"));
40+
final RunNode newNode = new RunNode(assertNotNull(command, "Runnable must not be null"));
4141
final RunNode prevLast = last.getAndSet(newNode);
4242
if (prevLast != null)
4343
prevLast.lazySet(newNode);

‎src/main/java/graphql/execution/reactive/SingleSubscriberPublisher.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import java.util.Deque;
99
import java.util.concurrent.ConcurrentLinkedDeque;
1010

11-
import static java.util.Objects.requireNonNull;
11+
import static graphql.Assert.assertNotNull;
1212

1313
/**
1414
* A Publisher of things that are buffered and handles a single subscriber at a time.
@@ -49,7 +49,7 @@ public SingleSubscriberPublisher() {
4949
* @param subscriptionCallback the callback when some ones
5050
*/
5151
public SingleSubscriberPublisher(OnSubscriptionCallback subscriptionCallback) {
52-
this.subscriptionCallback = requireNonNull(subscriptionCallback);
52+
this.subscriptionCallback = assertNotNull(subscriptionCallback);
5353
}
5454

5555

@@ -98,7 +98,7 @@ private void handleOnComplete() {
9898

9999
@Override
100100
public void subscribe(Subscriber<? super T> subscriber) {
101-
requireNonNull(subscriber, "Subscriber passed to subscribe must not be null");
101+
assertNotNull(subscriber, "Subscriber passed to subscribe must not be null");
102102
mutex.execute(() -> {
103103
if (this.subscriber == null) {
104104
this.subscriber = subscriber;

0 commit comments

Comments
 (0)