Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace @SuppressWarnings("NullableProblems") with @NonNull #134

Merged
merged 1 commit into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ protected ItemProcessorAdapter(ItemProcessorDelegate<I, O> delegate) {
this.delegate = Objects.requireNonNull(delegate, "Delegate processor must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public O process(I item) {
public O process(@NonNull I item) {
return this.delegate.process(item);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ protected ItemStreamFluxReaderAdapter(ItemStreamFluxReaderDelegate<T> delegate)
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) {
public void open(@NonNull ExecutionContext executionContext) {
this.delegate.onOpenRead(executionContext);
this.flux = this.delegate.readFlux(executionContext);
}
Expand All @@ -75,9 +74,8 @@ public T read() {
}
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) {
public void update(@NonNull ExecutionContext executionContext) {
this.delegate.onUpdateRead(executionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ protected ItemStreamIterableReaderAdapter(ItemStreamIterableReaderDelegate<T> de
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) {
public void open(@NonNull ExecutionContext executionContext) {
this.delegate.onOpenRead(executionContext);
this.iterable = this.delegate.readIterable(executionContext);
}
Expand All @@ -71,9 +70,8 @@ public T read() {
}
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) {
public void update(@NonNull ExecutionContext executionContext) {
this.delegate.onUpdateRead(executionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ protected ItemStreamIteratorReaderAdapter(ItemStreamIteratorReaderDelegate<T> de
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) {
public void open(@NonNull ExecutionContext executionContext) {
this.delegate.onOpenRead(executionContext);
this.iterator = this.delegate.readIterator(executionContext);
}
Expand All @@ -68,9 +67,8 @@ public T read() {
}
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) {
public void update(@NonNull ExecutionContext executionContext) {
this.delegate.onUpdateRead(executionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ protected ItemStreamSimpleReaderAdapter(ItemStreamSimpleReaderDelegate<T> delega
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) {
public void open(@NonNull ExecutionContext executionContext) {
this.delegate.onOpenRead(executionContext);
}

Expand All @@ -59,9 +58,8 @@ public T read() {
return this.delegate.read();
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) {
public void update(@NonNull ExecutionContext executionContext) {
this.delegate.onUpdateRead(executionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,18 @@ protected ItemStreamWriterAdapter(ItemStreamWriterDelegate<T> delegate) {
this.delegate = Objects.requireNonNull(delegate, "Delegate writer must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) {
public void open(@NonNull ExecutionContext executionContext) {
this.delegate.onOpenWrite(executionContext);
}

@SuppressWarnings("NullableProblems")
@Override
public void write(Chunk<? extends T> chunk) {
public void write(@NonNull Chunk<? extends T> chunk) {
this.delegate.write(chunk);
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) {
public void update(@NonNull ExecutionContext executionContext) {
this.delegate.onUpdateWrite(executionContext);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemStreamReader;
import org.springframework.lang.NonNull;

/**
* A {@link StepScope} bound proxy implementation.
Expand Down Expand Up @@ -60,9 +61,8 @@ protected StepScopeItemStreamReader(Supplier<ItemStreamReader<T>> readerGenerato
this.delegateSupplier = Objects.requireNonNull(readerGenerator, "Reader generator must not be null");
}

@SuppressWarnings("NullableProblems")
@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
public void open(@NonNull ExecutionContext executionContext) throws ItemStreamException {
getDelegate().open(executionContext);
}

Expand All @@ -71,9 +71,8 @@ public T read() throws Exception {
return getDelegate().read();
}

@SuppressWarnings("NullableProblems")
@Override
public void update(ExecutionContext executionContext) throws ItemStreamException {
public void update(@NonNull ExecutionContext executionContext) throws ItemStreamException {
getDelegate().update(executionContext);
}

Expand Down