diff --git a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionExecutionData.java b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionExecutionData.java index edcbb4d5a..90b2dddaf 100644 --- a/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionExecutionData.java +++ b/cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ActionExecutionData.java @@ -210,10 +210,13 @@ private Map runJavaAction(Map } final Serializable exception = returnMap.get(EXCEPTION); - // some java actions contain the exception key without having an actual exception - // this is because some actions have the output field named as "errorMessage", others "exception" - if (exception != null && StringUtils.isNotEmpty(exception.toString())) { - logException(exception.toString()); + if (exception != null) { + // some java actions contain the exception key without having an actual exception + // this is because some actions have the output field named as "errorMessage", others "exception" + String exceptionMessage = exception.toString(); + if (!exceptionMessage.isEmpty()) { + logException(exceptionMessage); + } } return handleSensitiveValues(returnMap, currentContext);