Author: jleroux
Date: Sat Nov 28 16:27:42 2009 New Revision: 885112 URL: http://svn.apache.org/viewvc?rev=885112&view=rev Log: More uses of is(Not)Empty Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java?rev=885112&r1=885111&r2=885112&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentPermissionServices.java Sat Nov 28 16:27:42 2009 @@ -291,8 +291,7 @@ Map permResults = FastMap.newInstance(); String skipPermissionCheck = null; - if (skipPermissionCheck == null - || skipPermissionCheck.length() == 0 + if (UtilValidate.isEmpty(skipPermissionCheck) || (!skipPermissionCheck.equalsIgnoreCase("true") && !skipPermissionCheck.equalsIgnoreCase("granted"))) { // Use the purposes from the from entity for both cases. List relatedPurposes = EntityPermissionChecker.getRelatedPurposes(contentFrom, null); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=885112&r1=885111&r2=885112&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sat Nov 28 16:27:42 2009 @@ -1044,8 +1044,7 @@ Map permResults = FastMap.newInstance(); String skipPermissionCheck = (String) context.get("skipPermissionCheck"); - if (skipPermissionCheck == null - || skipPermissionCheck.length() == 0 + if (UtilValidate.isEmpty(skipPermissionCheck) || (!skipPermissionCheck.equalsIgnoreCase("true") && !skipPermissionCheck.equalsIgnoreCase("granted"))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); Map serviceInMap = FastMap.newInstance(); Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=885112&r1=885111&r2=885112&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Sat Nov 28 16:27:42 2009 @@ -293,8 +293,7 @@ String skipPermissionCheck = (String) context.get("skipPermissionCheck"); if (Debug.infoOn()) Debug.logInfo("in callDataResourcePermissionCheckResult, skipPermissionCheck:" + skipPermissionCheck,""); - if (skipPermissionCheck == null - || skipPermissionCheck.length() == 0 + if (UtilValidate.isEmpty(skipPermissionCheck) || (!skipPermissionCheck.equalsIgnoreCase("true") && !skipPermissionCheck.equalsIgnoreCase("granted"))) { GenericValue userLogin = (GenericValue) context.get("userLogin"); Map<String, Object> serviceInMap = FastMap.newInstance(); Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java?rev=885112&r1=885111&r2=885112&view=diff ============================================================================== --- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java (original) +++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/seleniumxml/RemoteRequest.java Sat Nov 28 16:27:42 2009 @@ -331,7 +331,7 @@ valueStr = value.toString(); } - if (valueStr != null && valueStr.length() > 0) { + if (UtilValidate.isNotEmpty(valueStr)) { if (buf.length() > 0) { if (useExpandedEntites) { buf.append("&"); |
Free forum by Nabble | Edit this page |