algairim commented on a change in pull request #1163:
URL: https://github.com/apache/brooklyn-server/pull/1163#discussion_r614865530
##########
File path:
core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
##########
@@ -650,6 +662,15 @@ private boolean hasTaskAsAncestor(Task<?> t, Task<?>
potentialAncestor) {
return hasTaskAsAncestor(t.getSubmittedByTask(), potentialAncestor);
}
+ private Task<?> getRootTask(Task<?> t) {
+ Task<?> result = t;
+ while (t!=null) {
+ result = t;
+ t = t.getSubmittedByTask();
Review comment:
I looked at documentation
```
/** task which submitted this task, if was submitted by a task */`
public Task<?> getSubmittedByTask();
```
If task cannot submit itself then this should be fine of course.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]