diff --git a/server/src/main/java/org/elasticsearch/action/TaskOperationFailure.java b/server/src/main/java/org/elasticsearch/action/TaskOperationFailure.java index 8740c446b06..0dac5cd7eca 100644 --- a/server/src/main/java/org/elasticsearch/action/TaskOperationFailure.java +++ b/server/src/main/java/org/elasticsearch/action/TaskOperationFailure.java @@ -33,7 +33,6 @@ import org.elasticsearch.rest.RestStatus; import java.io.IOException; -import static org.elasticsearch.ExceptionsHelper.detailedMessage; import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg; /** @@ -102,10 +101,6 @@ public final class TaskOperationFailure implements Writeable, ToXContentFragment return this.taskId; } - public String getReason() { - return detailedMessage(reason); - } - public RestStatus getStatus() { return status; } @@ -116,7 +111,7 @@ public final class TaskOperationFailure implements Writeable, ToXContentFragment @Override public String toString() { - return "[" + nodeId + "][" + taskId + "] failed, reason [" + getReason() + "]"; + return "[" + nodeId + "][" + taskId + "] failed, reason [" + reason + "]"; } public static TaskOperationFailure fromXContent(XContentParser parser) { diff --git a/server/src/test/java/org/elasticsearch/action/TaskOperationFailureTests.java b/server/src/test/java/org/elasticsearch/action/TaskOperationFailureTests.java index 442cb55def5..526cf672d34 100644 --- a/server/src/test/java/org/elasticsearch/action/TaskOperationFailureTests.java +++ b/server/src/test/java/org/elasticsearch/action/TaskOperationFailureTests.java @@ -46,9 +46,6 @@ public class TaskOperationFailureTests extends AbstractXContentTestCase