From 2f48d980b3858bd1dd02b6eb0c47268164f947ee Mon Sep 17 00:00:00 2001 From: uboness Date: Fri, 22 May 2015 15:10:41 +0200 Subject: [PATCH] Fixing issues after master rebase Original commit: elastic/x-pack-elasticsearch@d3dfa53483685f33d850e935659615b49f234db3 --- .../watcher/actions/throttler/Throttler.java | 7 ------- .../watcher/condition/compare/CompareCondition.java | 4 ++-- .../condition/compare/CompareConditionFactory.java | 2 -- .../compare/ExecutableCompareCondition.java | 4 ++-- .../watcher/test/integration/BootStrapTests.java | 12 ------------ 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/elasticsearch/watcher/actions/throttler/Throttler.java b/src/main/java/org/elasticsearch/watcher/actions/throttler/Throttler.java index 7374f19cda8..bbcd63b1840 100644 --- a/src/main/java/org/elasticsearch/watcher/actions/throttler/Throttler.java +++ b/src/main/java/org/elasticsearch/watcher/actions/throttler/Throttler.java @@ -14,13 +14,6 @@ import org.elasticsearch.watcher.execution.WatchExecutionContext; */ public interface Throttler { - Throttler NO_THROTTLE = new Throttler() { - @Override - public Result throttle(String actionId, WatchExecutionContext ctx) { - return Result.NO; - } - }; - Result throttle(String actionId, WatchExecutionContext ctx); class Result { diff --git a/src/main/java/org/elasticsearch/watcher/condition/compare/CompareCondition.java b/src/main/java/org/elasticsearch/watcher/condition/compare/CompareCondition.java index 30ce82f748d..33a936d8d0c 100644 --- a/src/main/java/org/elasticsearch/watcher/condition/compare/CompareCondition.java +++ b/src/main/java/org/elasticsearch/watcher/condition/compare/CompareCondition.java @@ -10,7 +10,7 @@ import org.elasticsearch.common.joda.time.DateTime; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.watcher.condition.Condition; -import org.elasticsearch.watcher.support.WatcherDateUtils; +import org.elasticsearch.watcher.support.WatcherDateTimeUtils; import org.elasticsearch.watcher.support.xcontent.WatcherXContentUtils; import java.io.IOException; @@ -282,7 +282,7 @@ public class CompareCondition implements Condition { } if (v1 instanceof String) { try { - v1 = WatcherDateUtils.parseDate((String) v1); + v1 = WatcherDateTimeUtils.parseDate((String) v1); } catch (Exception e) { return null; } diff --git a/src/main/java/org/elasticsearch/watcher/condition/compare/CompareConditionFactory.java b/src/main/java/org/elasticsearch/watcher/condition/compare/CompareConditionFactory.java index f7949ceea88..a1cf0f8d425 100644 --- a/src/main/java/org/elasticsearch/watcher/condition/compare/CompareConditionFactory.java +++ b/src/main/java/org/elasticsearch/watcher/condition/compare/CompareConditionFactory.java @@ -6,12 +6,10 @@ package org.elasticsearch.watcher.condition.compare; import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.joda.DateMathParser; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.watcher.condition.ConditionFactory; -import org.elasticsearch.watcher.support.WatcherDateUtils; import org.elasticsearch.watcher.support.clock.Clock; import java.io.IOException; diff --git a/src/main/java/org/elasticsearch/watcher/condition/compare/ExecutableCompareCondition.java b/src/main/java/org/elasticsearch/watcher/condition/compare/ExecutableCompareCondition.java index 52917616a87..d396ecfebe3 100644 --- a/src/main/java/org/elasticsearch/watcher/condition/compare/ExecutableCompareCondition.java +++ b/src/main/java/org/elasticsearch/watcher/condition/compare/ExecutableCompareCondition.java @@ -9,7 +9,7 @@ import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.watcher.condition.ExecutableCondition; import org.elasticsearch.watcher.execution.WatchExecutionContext; import org.elasticsearch.watcher.support.Variables; -import org.elasticsearch.watcher.support.WatcherDateUtils; +import org.elasticsearch.watcher.support.WatcherDateTimeUtils; import org.elasticsearch.watcher.support.clock.Clock; import org.elasticsearch.watcher.support.xcontent.MapPath; @@ -48,7 +48,7 @@ public class ExecutableCompareCondition extends ExecutableCondition