Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/816#discussion_r141623079
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/util/core/task/BasicTask.java ---
    @@ -327,11 +328,10 @@ public synchronized boolean 
cancel(TaskCancellationMode mode) {
             return true;
         }
         
    -    @SuppressWarnings("deprecation")
         protected boolean doCancel(TaskCancellationMode mode) {
             if (internalFuture!=null) { 
    -            if (internalFuture instanceof ListenableForwardingFuture) {
    -                return 
((ListenableForwardingFuture<?>)internalFuture).cancel(mode);
    +            if (internalFuture instanceof 
CancellingListenableForwardingFutureForTask) {
    --- End diff --
    
    agree.  relatively easy to introduce an interface for 
`cancel(TaskCancellationMode)`.  in fact i will do that here.


---

Reply via email to