You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2022/10/22 00:38:26 UTC
[brooklyn-server] 02/02: fix error message with recent task builder change
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
commit fdfc806cda0242b03ec5de1be1b0f4e0cff2a6f6
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Sat Oct 22 01:37:58 2022 +0100
fix error message with recent task builder change
---
.../main/java/org/apache/brooklyn/util/core/task/TaskBuilder.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/TaskBuilder.java b/core/src/main/java/org/apache/brooklyn/util/core/task/TaskBuilder.java
index 069903f728..97ea74cf7e 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/task/TaskBuilder.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/task/TaskBuilder.java
@@ -158,8 +158,10 @@ public class TaskBuilder<T> {
if (description!=null) taskFlags.put("description", description);
if (!tags.isEmpty()) {
Object otherTags = taskFlags.put("tags", tags);
- if (otherTags instanceof Collection) tags.addAll((Collection)otherTags);
- else log.warn("Ignoring unexpected 'tags' flag in task: "+otherTags);
+ if (otherTags!=null) {
+ if (otherTags instanceof Collection) tags.addAll((Collection) otherTags);
+ else log.warn("Ignoring unexpected 'tags' flag in task: " + otherTags);
+ }
}
if (Boolean.FALSE.equals(dynamic) && children.isEmpty()) {