You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2017/01/26 16:45:47 UTC

[GitHub] brooklyn-server pull request #493: Make the Repeater class use a threads to ...

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

    https://github.com/apache/brooklyn-server/pull/493#discussion_r98030620
  
    --- Diff: utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java ---
    @@ -301,89 +332,96 @@ public Repeater limitTimeTo(Duration duration) {
         public boolean run() {
             return runKeepingError().getWithoutError();
         }
    -    
    +
         public void runRequiringTrue() {
             Stopwatch timer = Stopwatch.createStarted();
             ReferenceWithError<Boolean> result = runKeepingError();
             result.checkNoError();
    -        if (!result.get()) 
    +        if (!result.get()) {
                 throw new IllegalStateException(description+" unsatisfied after "+Duration.of(timer));
    +        }
         }
    -    
    +
         public ReferenceWithError<Boolean> runKeepingError() {
    -        Preconditions.checkState(body != null, "repeat() method has not been called to set the body");
    --- End diff --
    
    Any reason to remove the body != null check?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---