brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #835: Tasks subsystem improvements - adjuncts, ...
Date Thu, 05 Oct 2017 12:37:30 GMT
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).


---

Mime
View raw message