ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r810370 - /ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
Date Wed, 02 Sep 2009 06:22:23 GMT
Author: jleroux
Date: Wed Sep  2 06:22:23 2009
New Revision: 810370

URL: http://svn.apache.org/viewvc?rev=810370&view=rev
Log:
Fix for "ServiceUtil.getUserLogin tests on null but not empty" (https://issues.apache.org/jira/browse/OFBIZ-2838)
- OFBIZ-2838

Thank you Al for report

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=810370&r1=810369&r2=810370&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Wed Sep  2 06:22:23
2009
@@ -584,7 +584,7 @@
     public static GenericValue getUserLogin(DispatchContext dctx, Map<String, ? extends
Object> context, String runAsUser) {
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         GenericDelegator delegator = dctx.getDelegator();
-        if (runAsUser != null) {
+        if (UtilValidate.isNotEmpty(runAsUser)) {
             try {
                 GenericValue runAs = delegator.findByPrimaryKeyCache("UserLogin", "userLoginId",
runAsUser);
                 if (runAs != null) {



Mime
View raw message