/** * <p>Constructor for ConditionAwaiter.</p> * * @param conditionEvaluator a {@link ConditionEvaluator} object. * @param conditionSettings a {@link org.awaitility.core.ConditionSettings} object. */ ConditionAwaiter(final ConditionEvaluator conditionEvaluator, final ConditionSettings conditionSettings) { if (conditionEvaluator == null) { throw new IllegalArgumentException("You must specify a condition (was null)."); } if (conditionSettings == null) { throw new IllegalArgumentException("You must specify the condition settings (was null)."); } if (conditionSettings.shouldCatchUncaughtExceptions()) { Thread.setDefaultUncaughtExceptionHandler(this); } this.conditionSettings = conditionSettings; this.conditionEvaluator = conditionEvaluator; this.executor = conditionSettings.getExecutorLifecycle().supplyExecutorService(); this.uncaughtThrowable = new AtomicReference<Throwable>(); }
/** * <p>Constructor for ConditionAwaiter.</p> * * @param conditionEvaluator a {@link ConditionEvaluator} object. * @param conditionSettings a {@link org.awaitility.core.ConditionSettings} object. */ ConditionAwaiter(final ConditionEvaluator conditionEvaluator, final ConditionSettings conditionSettings) { if (conditionEvaluator == null) { throw new IllegalArgumentException("You must specify a condition (was null)."); } if (conditionSettings == null) { throw new IllegalArgumentException("You must specify the condition settings (was null)."); } if (conditionSettings.shouldCatchUncaughtExceptions()) { Thread.setDefaultUncaughtExceptionHandler(this); } this.conditionSettings = conditionSettings; this.conditionEvaluator = conditionEvaluator; this.executor = conditionSettings.getExecutorLifecycle().supplyExecutorService(); this.uncaughtThrowable = new AtomicReference<Throwable>(); }