mirror of https://github.com/apache/druid.git
Fix wrong null check in TaskStatusPlus (#5678)
This commit is contained in:
parent
2e76012aca
commit
034a0aa42b
|
@ -50,15 +50,15 @@ public class TaskStatusPlus
|
|||
@JsonProperty("statusCode") @Nullable TaskState state,
|
||||
@JsonProperty("duration") @Nullable Long duration,
|
||||
@JsonProperty("location") TaskLocation location,
|
||||
@JsonProperty("dataSource") String dataSource,
|
||||
@JsonProperty("errorMsg") String errorMsg
|
||||
@JsonProperty("dataSource") @Nullable String dataSource, // nullable for backward compatibility
|
||||
@JsonProperty("errorMsg") @Nullable String errorMsg
|
||||
)
|
||||
{
|
||||
if (state != null && state.isComplete()) {
|
||||
Preconditions.checkNotNull(duration, "duration");
|
||||
}
|
||||
this.id = Preconditions.checkNotNull(id, "id");
|
||||
this.type = Preconditions.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
this.createdTime = Preconditions.checkNotNull(createdTime, "createdTime");
|
||||
this.queueInsertionTime = Preconditions.checkNotNull(queueInsertionTime, "queueInsertionTime");
|
||||
this.state = state;
|
||||
|
|
Loading…
Reference in New Issue