eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ralp...@apache.org
Subject incubator-eagle git commit: [EAGLE-573]: NPE when apply change of EAGLE-569
Date Wed, 28 Sep 2016 00:25:02 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 0fac33799 -> 1fa490e0c


[EAGLE-573]: NPE when apply change of EAGLE-569

Author : ralphsu

This closes #458


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

Branch: refs/heads/master
Commit: 1fa490e0c5b0c1b827791909968fcee7adc8ea7c
Parents: 0fac337
Author: Ralph, Su <suliangfei@gmail.com>
Authored: Tue Sep 27 17:22:43 2016 -0700
Committer: Ralph, Su <suliangfei@gmail.com>
Committed: Tue Sep 27 17:25:02 2016 -0700

----------------------------------------------------------------------
 .../alert/engine/publisher/impl/AlertPublisherImpl.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/1fa490e0/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 e97a763..87ac30f 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
@@ -74,7 +74,13 @@ public class AlertPublisherImpl implements AlertPublisher {
             LOG.warn("policyId cannot be null for event to be published");
             return;
         }
-        for (String pubId : policyPublishPluginMapping.get(policyId)) {
+        List<String> pubIds = policyPublishPluginMapping.get(policyId);
+        if (pubIds == null) {
+            LOG.warn("Policy {} does *NOT* subscribe any publishment!", policyId);
+            return;
+        }
+
+        for (String pubId : pubIds) {
             AlertPublishPlugin plugin = pubId != null ? publishPluginMapping.get(pubId) :
null;
             if (plugin == null) {
                 LOG.warn("Policy {} does *NOT* subscribe any publishment!", policyId);


Mime
View raw message