Author: jacopoc
Date: Fri Dec 9 14:21:56 2016
New Revision: 1773405
URL:
http://svn.apache.org/viewvc?rev=1773405&view=revLog:
Fixed: removed a redundant null check and parenthesis.
Modified:
ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java
ofbiz/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
Modified: ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java?rev=1773405&r1=1773404&r2=1773405&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java (original)
+++ ofbiz/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/OrderByItem.java Fri Dec 9 14:21:56 2016
@@ -159,11 +159,10 @@ public class OrderByItem implements Comp
if (value1 == null) {
result = value2 == null ? 0 : 1;
} else if (value2 == null) {
- result = value1 == null ? 0 : -1;
+ result = -1;
} else {
result = value1.compareTo(value2);
}
- // if (Debug.infoOn()) Debug.logInfo("[OrderByComparator.compareAsc] Result is " + result + " for [" + value + "] and [" + value2 + "]", module);
return descending ? -result : result;
}
Modified: ofbiz/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1773405&r1=1773404&r2=1773405&view=diff==============================================================================
--- ofbiz/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java Fri Dec 9 14:21:56 2016
@@ -638,7 +638,7 @@ public class EntityPermissionChecker {
if (idx1 == 0) {
String roleOp1 = roleOp.substring(4); // lop off "HAS_"
int idx2 = roleOp1.indexOf("_ROLE");
- if (idx2 == (roleOp1.length() - 5)) {
+ if (idx2 == roleOp1.length() - 5) {
String roleOp2 = roleOp1.substring(0, roleOp1.indexOf("_ROLE") - 1); // lop off "_ROLE"
//if (Debug.infoOn()) Debug.logInfo("roleOp2:" + roleOp2, module);
newHasRoleList.add(roleOp2);