svn commit: r430999 - /incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r430999 - /incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

jonesde
Author: jonesde
Date: Sat Aug 12 02:13:29 2006
New Revision: 430999

URL: http://svn.apache.org/viewvc?rev=430999&view=rev
Log:
Added exception if no delegator passed in to JobManager, better than NPE

Modified:
    incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java

Modified: incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java?rev=430999&r1=430998&r2=430999&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java (original)
+++ incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java Sat Aug 12 02:13:29 2006
@@ -71,6 +71,9 @@
 
     /** Creates a new JobManager object. */
     public JobManager(GenericDelegator delegator) {
+        if (delegator == null) {
+            throw new GeneralRuntimeException("ERROR: null delegator passed, cannot create JobManager");
+        }
         if (JobManager.registeredManagers.get(delegator.getDelegatorName()) != null) {
             throw new GeneralRuntimeException("JobManager for [" + delegator.getDelegatorName() + "] already running");
         }