From 1a2822d3bfbc3b5833ac8a8490264dfc60554020 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Fri, 25 Jan 2013 18:23:22 +0530 Subject: [PATCH] hanlde case where no EventBus implementation is configured in component locator config file --- server/src/com/cloud/event/ActionEventCallback.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/event/ActionEventCallback.java b/server/src/com/cloud/event/ActionEventCallback.java index eeec2b4feae..0ab3c63c1a6 100644 --- a/server/src/com/cloud/event/ActionEventCallback.java +++ b/server/src/com/cloud/event/ActionEventCallback.java @@ -181,7 +181,9 @@ public class ActionEventCallback implements MethodInterceptor, AnnotationInterce Adapters eventBusImpls = locator.getAdapters(EventBus.class); if (eventBusImpls != null) { Enumeration eventBusenum = eventBusImpls.enumeration(); - _eventBus = eventBusenum.nextElement(); + if (eventBusenum != null && eventBusenum.hasMoreElements()) { + _eventBus = eventBusenum.nextElement(); + } } _eventBusLoaded = true; }