Author: doogie
Date: Mon Mar 15 17:30:44 2010
New Revision: 923350
URL:
http://svn.apache.org/viewvc?rev=923350&view=revLog:
Fix bad formatting and code patterns(Integer.valueOf).
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=923350&r1=923349&r2=923350&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Mar 15 17:30:44 2010
@@ -980,21 +980,21 @@ public class ProductPromoWorker {
if (UtilValidate.isEmpty(partyId) || UtilValidate.isEmpty(condValue)) {
compareBase = Integer.valueOf(1);
} else {
- String groupPartyId = condValue;
- if (partyId.equals(groupPartyId)) {
- compareBase = new Integer(0);
- } else {
+ String groupPartyId = condValue;
+ if (partyId.equals(groupPartyId)) {
+ compareBase = Integer.valueOf(0);
+ } else {
// look for PartyRelationship with partyRelationshipTypeId=GROUP_ROLLUP, the partyIdTo is the group member, so the partyIdFrom is the groupPartyId
- List<GenericValue> partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdFrom", groupPartyId, "partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP"));
+ List<GenericValue> partyRelationshipList = delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdFrom", groupPartyId, "partyIdTo", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP"));
// and from/thru date within range
partyRelationshipList = EntityUtil.filterByDate(partyRelationshipList, true);
-
+
if (UtilValidate.isNotEmpty(partyRelationshipList)) {
- compareBase = new Integer(0);
- } else {
- compareBase = new Integer(checkConditionPartyHierarchy(delegator, nowTimestamp, groupPartyId, partyId));
- }
- }
+ compareBase = Integer.valueOf(0);
+ } else {
+ compareBase = Integer.valueOf(checkConditionPartyHierarchy(delegator, nowTimestamp, groupPartyId, partyId));
+ }
+ }
}
} else if ("PPIP_PARTY_CLASS".equals(inputParamEnumId)) {
if (UtilValidate.isEmpty(partyId) || UtilValidate.isEmpty(condValue)) {