algairim commented on a change in pull request #1163:
URL: https://github.com/apache/brooklyn-server/pull/1163#discussion_r614843841
##########
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:
Break the loop if `getSubmittedByTask` returns same object reference as
`t`.
--
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]