eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ralp...@apache.org
Subject [1/2] incubator-eagle git commit: EAGLE-755: Publishment without streamIds update encountered NPE
Date Wed, 09 Nov 2016 02:43:08 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 60206b5b5 -> 6ec928941


EAGLE-755: Publishment without streamIds update encountered NPE

Author: Li, Garrett
Reviewer: ralphsu

This closes #629


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/bd5f2423
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/bd5f2423
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/bd5f2423

Branch: refs/heads/master
Commit: bd5f242307fa184b9e8f272a862d7468e4dedd23
Parents: 60206b5
Author: Zhao, Qingwen <qingwzhao@apache.org>
Authored: Tue Nov 8 21:16:53 2016 +0800
Committer: Ralph, Su <suliangfei@gmail.com>
Committed: Wed Nov 9 10:19:10 2016 +0800

----------------------------------------------------------------------
 .../eagle/alert/engine/publisher/impl/AlertPublisherImpl.java     | 3 ++-
 .../alert-engine/src/test/resources/testPublishSpec3.json         | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/bd5f2423/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
index ddb4a21..a4038e7 100644
--- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
+++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
@@ -35,6 +35,7 @@ import org.apache.eagle.alert.engine.publisher.AlertPublisher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Objects;
 import com.typesafe.config.Config;
 
 @SuppressWarnings("rawtypes")
@@ -167,7 +168,7 @@ public class AlertPublisherImpl implements AlertPublisher {
             List<String> oldPolicies = beforeModified.get(i).getPolicyIds();
             List<String> oldStreams = beforeModified.get(i).getStreamIds();
 
-            if (!newPolicies.equals(oldPolicies) || !newStreams.equals(oldStreams)) {
+            if (!newPolicies.equals(oldPolicies) || !Objects.equal(newStreams, oldStreams))
{
                 // since both policy & stream may change, skip the compare and difference
update
                 removePublihsPoliciesStreams(newPSPublishPluginMapping, oldPolicies, pubName);
                 addPublishmentPoliciesStreams(newPSPublishPluginMapping, newPolicies, newStreams,
pubName);

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/bd5f2423/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/resources/testPublishSpec3.json
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/resources/testPublishSpec3.json
b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/resources/testPublishSpec3.json
index 0bf0e2a..0de8218 100644
--- a/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/resources/testPublishSpec3.json
+++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/resources/testPublishSpec3.json
@@ -9,9 +9,6 @@
       "policyIds": [
         "policy1"
       ],
-      "streamIds": [
-        "stream2"
-      ],
       "dedupIntervalMin": "PT2M",
       "properties": {
         "subject": "Test Alert",


Mime
View raw message