From fa64526c4617f6a3624cfe0bd62e32093daa56a5 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 13 Jun 2013 15:46:03 -0700 Subject: [PATCH] CSPACE-6042: Avoid returning null as a toString() value from InvocationError. --- .../collectionspace/services/common/invocable/Invocable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/common/src/main/java/org/collectionspace/services/common/invocable/Invocable.java b/services/common/src/main/java/org/collectionspace/services/common/invocable/Invocable.java index ce206ea8d..8c498d86e 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/invocable/Invocable.java +++ b/services/common/src/main/java/org/collectionspace/services/common/invocable/Invocable.java @@ -24,6 +24,7 @@ package org.collectionspace.services.common.invocable; import org.collectionspace.services.common.invocable.InvocationContext; import java.util.List; +import org.collectionspace.services.common.api.Tools; /** * Invocable defines an interface for invocable jobs (batch, reports, exports, @@ -59,7 +60,7 @@ public interface Invocable { @Override public String toString() { - return getMessage(); + return (Tools.notBlank(message)) ? message : "No error message provided"; } } public String INVOCATION_MODE_SINGLE = "single"; -- 2.47.3