-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
In JobParameter constructor there are duplicated assertion which check value
parameter is not null.
spring-batch/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java
Line 50 in d3bb0de
public JobParameter(@NonNull T value, @NonNull Class<T> type, boolean identifying) { |
public JobParameter(@NonNull T value, @NonNull Class<T> type, boolean identifying) {
Assert.notNull(value, "value must not be null");
Assert.notNull(value, "type must not be null");
this.value = value;
this.type = type;
this.identifying = identifying;
}
With annotation of construction parameter and message in second Assert.notNull
,
I guess second assertion might be intended to check that type parameter value is not null.
If my guess is correct, then how about change second assertion to check type
parameter instead of value
fmbenhassine