Skip to content

Incorrect notNull assertion on parameter type in JobParameter #4263

Closed
@parksjin01

Description

@parksjin01

In JobParameter constructor there are duplicated assertion which check value parameter is not null.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions