From eb8e630f24f5359b6c2e9a74bf12ea338df66a41 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Mon, 2 Jun 2014 22:43:27 +0530 Subject: [PATCH] AlertGenerator: Fix NPE from CLOUDSTACK-3272 There was a commit 4b89a45e571a34dff0191d501089aa9b1046bc08 on master which was added by "root@devcloud.apache.org" with no committer signature so I cannot tell whom to reach. In the code it looks like they forgot to initialize the static config dao variable which is causing NPE on master. The fix simply initializes the s_configDao with injected configDao object. Signed-off-by: Rohit Yadav --- server/src/com/cloud/event/AlertGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/com/cloud/event/AlertGenerator.java b/server/src/com/cloud/event/AlertGenerator.java index 85c6075693d..49a0ae944bd 100644 --- a/server/src/com/cloud/event/AlertGenerator.java +++ b/server/src/com/cloud/event/AlertGenerator.java @@ -64,6 +64,7 @@ public class AlertGenerator { void init() { s_dcDao = dcDao; s_podDao = podDao; + s_configDao = configDao; } public static void publishAlertOnEventBus(String alertType, long dataCenterId, Long podId, String subject, String body) {