This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git


The following commit(s) were added to refs/heads/master by this push:
     new ce3cb143d9 improve wf error msg
     new 7af171cf82 Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/brooklyn-server
ce3cb143d9 is described below

commit ce3cb143d9a4e60d8e2507c3c21c2ffa4d4918ae
Author: Alex Heneveld <[email protected]>
AuthorDate: Wed Apr 12 09:07:56 2023 +0100

    improve wf error msg
---
 .../brooklyn/core/workflow/steps/variables/SetVariableWorkflowStep.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/brooklyn/core/workflow/steps/variables/SetVariableWorkflowStep.java
 
b/core/src/main/java/org/apache/brooklyn/core/workflow/steps/variables/SetVariableWorkflowStep.java
index 82f7c3ac66..c0f6cccc0b 100644
--- 
a/core/src/main/java/org/apache/brooklyn/core/workflow/steps/variables/SetVariableWorkflowStep.java
+++ 
b/core/src/main/java/org/apache/brooklyn/core/workflow/steps/variables/SetVariableWorkflowStep.java
@@ -111,7 +111,7 @@ public class SetVariableWorkflowStep extends 
WorkflowStepDefinition {
             String names0 = names[0];
             if ("output".equals(names0)) throw new 
IllegalArgumentException("Cannot set subfield in output");  // catch common 
error
             Object h = 
context.getWorkflowExectionContext().getWorkflowScratchVariables().get(names0);
-            if (!(h instanceof Map)) throw new 
IllegalArgumentException("Cannot set " + name + " because " + name + " is " + 
(h == null ? "not set" : "not a map"));
+            if (!(h instanceof Map)) throw new 
IllegalArgumentException("Cannot set " + name + " because " + names0 + " is " + 
(h == null ? "unset" : "not a map"));
             for (int i=1; i<names.length-1; i++) {
                 Object hi = ((Map<?, ?>) h).get(names[i]);
                 if (hi==null) {

Reply via email to