ahgittin commented on code in PR #1400:
URL: https://github.com/apache/brooklyn-server/pull/1400#discussion_r1200746152
##########
core/src/main/java/org/apache/brooklyn/core/workflow/WorkflowStepResolution.java:
##########
@@ -90,7 +91,18 @@ static WorkflowStepDefinition resolveStep(ManagementContext
mgmt, Object def) {
if (s == null) s = defM.remove("shorthand");
if (s == null) s = defM.remove("s");
if (s == null) {
- throw new IllegalArgumentException("Step definition must
indicate a `type` or a `step` / `shorthand` / `s` ("+def+")");
+ if (defM.size()==1) {
+ // assume the colon caused it accidentally to be a map
+ s = Iterables.getOnlyElement(defM.keySet());
+ if (s instanceof String && ((String)s).contains(" ")) {
Review Comment:
in this (rare!) instance i think the longer-winded syntax is worth it for
readability
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]