[jbpm-commits] JBoss JBPM SVN: r3482 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Dec 20 08:15:35 EST 2008


Author: thomas.diesler at jboss.com
Date: 2008-12-20 08:15:35 -0500 (Sat, 20 Dec 2008)
New Revision: 3482

Modified:
   jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
Log:
Prevent NPE when services is not there. Is this a valid condition?

Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java	2008-12-20 13:12:41 UTC (rev 3481)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/graph/def/GraphElement.java	2008-12-20 13:15:35 UTC (rev 3482)
@@ -199,10 +199,14 @@
       JbpmContext jbpmContext = executionContext.getJbpmContext();
       if (jbpmContext != null)
       {
-        EventService evService = (EventService)jbpmContext.getServices().getService(EventService.SERVICE_NAME);
-        if (evService != null)
+        Services services = jbpmContext.getServices();
+        if (services != null)
         {
-          evService.fireEvent(eventType, this, executionContext);
+          EventService evService = (EventService)services.getService(EventService.SERVICE_NAME);
+          if (evService != null)
+          {
+            evService.fireEvent(eventType, this, executionContext);
+          }
         }
       }
       




More information about the jbpm-commits mailing list