Skip to content

Commit 289dbb2

Browse files
committed
Add missing nullability annotations
1 parent 8a1a72b commit 289dbb2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

providers/mongo/shedlock-provider-mongo-reactivestreams/src/main/java/net/javacrumbs/shedlock/provider/mongo/reactivestreams/ReactiveStreamsMongoLockProvider.java

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import net.javacrumbs.shedlock.core.SimpleLock;
2727
import net.javacrumbs.shedlock.support.LockException;
2828
import net.javacrumbs.shedlock.support.Utils;
29+
import net.javacrumbs.shedlock.support.annotation.Nullable;
2930
import org.bson.Document;
3031
import org.bson.conversions.Bson;
3132
import org.reactivestreams.Publisher;
@@ -157,6 +158,7 @@ private void unlock(LockConfiguration lockConfiguration) {
157158
));
158159
}
159160

161+
@Nullable
160162
static <T> T execute(Publisher<T> command) {
161163
SingleLockableSubscriber<T> subscriber = new SingleLockableSubscriber<>();
162164
command.subscribe(subscriber);

providers/mongo/shedlock-provider-mongo-reactivestreams/src/main/java/net/javacrumbs/shedlock/provider/mongo/reactivestreams/SingleLockableSubscriber.java

+2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ public void onComplete() {
5858
latch.countDown();
5959
}
6060

61+
@Nullable
6162
T getValue() {
6263
return value;
6364
}
6465

66+
@Nullable
6567
Throwable getError() {
6668
return error;
6769
}

0 commit comments

Comments
 (0)