You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2012/10/21 07:09:46 UTC
svn commit: r1400574 -
/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
Author: lektran
Date: Sun Oct 21 05:09:46 2012
New Revision: 1400574
URL: http://svn.apache.org/viewvc?rev=1400574&view=rev
Log:
Avoid potential NPE
Modified:
ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1400574&r1=1400573&r2=1400574&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java Sun Oct 21 05:09:46 2012
@@ -801,9 +801,9 @@ public class EntityPermissionChecker {
*/
public static List<String> getUserRoles(GenericValue entity, GenericValue userLogin, Delegator delegator) throws GenericEntityException {
- String entityName = entity.getEntityName();
List<String> roles = FastList.newInstance();
if (entity == null) return roles;
+ String entityName = entity.getEntityName();
// TODO: Need to use ContentManagementWorker.getAuthorContent first