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

    https://github.com/apache/brooklyn-server/pull/835#discussion_r142918395
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java 
---
    @@ -490,15 +490,7 @@ public ChangeListener getChangeListener() {
             ExecutionContext ec = 
BasicExecutionContext.getCurrentExecutionContext();
             if (ec == null) {
                 ec = managementContext.getServerExecutionContext();
    -            Task<List<Application>> task = ec.submit(new 
Callable<List<Application>>() {
    -                @Override public List<Application> call() throws Exception 
{
    -                    return rebindImpl(classLoader, exceptionHandler, mode);
    -                }});
    -            try {
    -                return task.get();
    -            } catch (Exception e) {
    -                throw Exceptions.propagate(e);
    -            }
    +            return 
ec.get(Tasks.<List<Application>>builder().displayName("rebind").dynamic(false).body(()
 -> rebindImpl(classLoader, exceptionHandler, mode)).build());
    --- End diff --
    
    Minor: I prefer splitting it onto multiple lines (this line is now 168 
chars long, the first 12 being the indent).


---

Reply via email to