svn commit: r661338 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java

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

svn commit: r661338 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java

jonesde
Author: jonesde
Date: Thu May 29 07:31:56 2008
New Revision: 661338

URL: http://svn.apache.org/viewvc?rev=661338&view=rev
Log:
Small change to fix NPE by checking for null instead of checking to see if there is an entry as it could be null

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java?rev=661338&r1=661337&r2=661338&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java Thu May 29 07:31:56 2008
@@ -98,8 +98,8 @@
 
                 // Get the userLoginId out of the context
                 String authUserLoginId = null;
-                if (context.containsKey("userLogin")) {
-                    GenericValue userLogin = (GenericValue)context.get("userLogin");
+                if (context.get("userLogin") != null) {
+                    GenericValue userLogin = (GenericValue) context.get("userLogin");
                     authUserLoginId = userLogin.getString("userLoginId");
                 }