Add annotations

This commit is contained in:
Andrea Cavalli 2021-09-23 12:03:53 +02:00
parent deab1a15de
commit a288e59189
3 changed files with 5 additions and 3 deletions

View File

@ -281,7 +281,7 @@ public class TdEasySettings {
return this;
}
public FatalErrorHandler getFatalErrorHandler() {
public @Nullable FatalErrorHandler getFatalErrorHandler() {
return fatalErrorHandler;
}

View File

@ -18,6 +18,7 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import org.jetbrains.annotations.NotNull;
import org.reactivestreams.Subscription;
import org.warp.commonutils.log.Logger;
import org.warp.commonutils.log.LoggerFactory;
@ -52,7 +53,7 @@ public abstract class BatchSubscriber<T> implements CoreSubscriber<T> {
}
@Override
public void onSubscribe(Subscription s) {
public void onSubscribe(@NotNull Subscription s) {
setOnce(S, this, s);
}

View File

@ -5,6 +5,7 @@ package it.tdlight.utils;
*/
import java.time.Duration;
import org.jetbrains.annotations.NotNull;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
@ -99,7 +100,7 @@ public class BufferTimeOutPublisher<T> implements Publisher<List<T>> {
// upstream
@Override
public void onSubscribe(Subscription s) {
public void onSubscribe(@NotNull Subscription s) {
this.subscription = s;
scheduledFuture = EXECUTOR.scheduleAtFixedRate(this::timeout, 0, this.duration, TimeUnit.MILLISECONDS);
}