Skip to content

Commit 0408b7e

Browse files
authored
Replace @SuppressWarnings("NullableProblems") with @nonnull
Signed-off-by: Taeik Lim <[email protected]>
1 parent 1679441 commit 0408b7e

File tree

7 files changed

+15
-28
lines changed

7 files changed

+15
-28
lines changed

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemProcessorAdapter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ protected ItemProcessorAdapter(ItemProcessorDelegate<I, O> delegate) {
4848
this.delegate = Objects.requireNonNull(delegate, "Delegate processor must not be null");
4949
}
5050

51-
@SuppressWarnings("NullableProblems")
5251
@Override
53-
public O process(I item) {
52+
public O process(@NonNull I item) {
5453
return this.delegate.process(item);
5554
}
5655
}

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemStreamFluxReaderAdapter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ protected ItemStreamFluxReaderAdapter(ItemStreamFluxReaderDelegate<T> delegate)
5858
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
5959
}
6060

61-
@SuppressWarnings("NullableProblems")
6261
@Override
63-
public void open(ExecutionContext executionContext) {
62+
public void open(@NonNull ExecutionContext executionContext) {
6463
this.delegate.onOpenRead(executionContext);
6564
this.flux = this.delegate.readFlux(executionContext);
6665
}
@@ -75,9 +74,8 @@ public T read() {
7574
}
7675
}
7776

78-
@SuppressWarnings("NullableProblems")
7977
@Override
80-
public void update(ExecutionContext executionContext) {
78+
public void update(@NonNull ExecutionContext executionContext) {
8179
this.delegate.onUpdateRead(executionContext);
8280
}
8381

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemStreamIterableReaderAdapter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ protected ItemStreamIterableReaderAdapter(ItemStreamIterableReaderDelegate<T> de
5454
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
5555
}
5656

57-
@SuppressWarnings("NullableProblems")
5857
@Override
59-
public void open(ExecutionContext executionContext) {
58+
public void open(@NonNull ExecutionContext executionContext) {
6059
this.delegate.onOpenRead(executionContext);
6160
this.iterable = this.delegate.readIterable(executionContext);
6261
}
@@ -71,9 +70,8 @@ public T read() {
7170
}
7271
}
7372

74-
@SuppressWarnings("NullableProblems")
7573
@Override
76-
public void update(ExecutionContext executionContext) {
74+
public void update(@NonNull ExecutionContext executionContext) {
7775
this.delegate.onUpdateRead(executionContext);
7876
}
7977

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemStreamIteratorReaderAdapter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ protected ItemStreamIteratorReaderAdapter(ItemStreamIteratorReaderDelegate<T> de
5151
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
5252
}
5353

54-
@SuppressWarnings("NullableProblems")
5554
@Override
56-
public void open(ExecutionContext executionContext) {
55+
public void open(@NonNull ExecutionContext executionContext) {
5756
this.delegate.onOpenRead(executionContext);
5857
this.iterator = this.delegate.readIterator(executionContext);
5958
}
@@ -68,9 +67,8 @@ public T read() {
6867
}
6968
}
7069

71-
@SuppressWarnings("NullableProblems")
7270
@Override
73-
public void update(ExecutionContext executionContext) {
71+
public void update(@NonNull ExecutionContext executionContext) {
7472
this.delegate.onUpdateRead(executionContext);
7573
}
7674

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemStreamSimpleReaderAdapter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ protected ItemStreamSimpleReaderAdapter(ItemStreamSimpleReaderDelegate<T> delega
4848
this.delegate = Objects.requireNonNull(delegate, "Delegate reader must not be null");
4949
}
5050

51-
@SuppressWarnings("NullableProblems")
5251
@Override
53-
public void open(ExecutionContext executionContext) {
52+
public void open(@NonNull ExecutionContext executionContext) {
5453
this.delegate.onOpenRead(executionContext);
5554
}
5655

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

62-
@SuppressWarnings("NullableProblems")
6361
@Override
64-
public void update(ExecutionContext executionContext) {
62+
public void update(@NonNull ExecutionContext executionContext) {
6563
this.delegate.onUpdateRead(executionContext);
6664
}
6765

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/ItemStreamWriterAdapter.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,18 @@ protected ItemStreamWriterAdapter(ItemStreamWriterDelegate<T> delegate) {
4949
this.delegate = Objects.requireNonNull(delegate, "Delegate writer must not be null");
5050
}
5151

52-
@SuppressWarnings("NullableProblems")
5352
@Override
54-
public void open(ExecutionContext executionContext) {
53+
public void open(@NonNull ExecutionContext executionContext) {
5554
this.delegate.onOpenWrite(executionContext);
5655
}
5756

58-
@SuppressWarnings("NullableProblems")
5957
@Override
60-
public void write(Chunk<? extends T> chunk) {
58+
public void write(@NonNull Chunk<? extends T> chunk) {
6159
this.delegate.write(chunk);
6260
}
6361

64-
@SuppressWarnings("NullableProblems")
6562
@Override
66-
public void update(ExecutionContext executionContext) {
63+
public void update(@NonNull ExecutionContext executionContext) {
6764
this.delegate.onUpdateWrite(executionContext);
6865
}
6966

spring-batch-plus/src/main/java/com/navercorp/spring/batch/plus/step/adapter/StepScopeItemStreamReader.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.springframework.batch.item.ExecutionContext;
3131
import org.springframework.batch.item.ItemStreamException;
3232
import org.springframework.batch.item.ItemStreamReader;
33+
import org.springframework.lang.NonNull;
3334

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

63-
@SuppressWarnings("NullableProblems")
6464
@Override
65-
public void open(ExecutionContext executionContext) throws ItemStreamException {
65+
public void open(@NonNull ExecutionContext executionContext) throws ItemStreamException {
6666
getDelegate().open(executionContext);
6767
}
6868

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

74-
@SuppressWarnings("NullableProblems")
7574
@Override
76-
public void update(ExecutionContext executionContext) throws ItemStreamException {
75+
public void update(@NonNull ExecutionContext executionContext) throws ItemStreamException {
7776
getDelegate().update(executionContext);
7877
}
7978

0 commit comments

Comments
 (0)