brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grkvlt <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #493: Make the Repeater class use a threads to ...
Date Tue, 31 Jan 2017 15:58:24 GMT
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/493#discussion_r98700487
  
    --- 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 --
    
    Should have been changed to a `checkNotNull()` call


---
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.
---

Mime
View raw message