From 034a0aa42bad1beb5702b6dc1f33925a623f54b9 Mon Sep 17 00:00:00 2001 From: Jihoon Son Date: Tue, 24 Apr 2018 10:59:29 -0700 Subject: [PATCH] Fix wrong null check in TaskStatusPlus (#5678) --- api/src/main/java/io/druid/indexer/TaskStatusPlus.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/io/druid/indexer/TaskStatusPlus.java b/api/src/main/java/io/druid/indexer/TaskStatusPlus.java index 89853263787..af60cd95e2a 100644 --- a/api/src/main/java/io/druid/indexer/TaskStatusPlus.java +++ b/api/src/main/java/io/druid/indexer/TaskStatusPlus.java @@ -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;