Skip to content

Commit

Permalink
Improved: Remove redundant specification of type arguments
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858294 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Apr 27, 2019
1 parent e034284 commit 948d739
Showing 1 changed file with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6487,8 +6487,8 @@ public static Map<String, Object> associateOrderWithAllocationPlans(DispatchCont
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue)context.get("userLogin");
String orderId = (String) context.get("orderId");
Map<String, String> productPlanMap = new HashMap<String, String>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, String> productPlanMap = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
try {
String userLoginId = null;
if (userLogin != null) {
Expand All @@ -6497,7 +6497,7 @@ public static Map<String, Object> associateOrderWithAllocationPlans(DispatchCont
//Get the list of associated products
OrderReadHelper orderReadHelper = new OrderReadHelper(delegator, orderId);
List<GenericValue> orderItems = orderReadHelper.getOrderItems();
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
for (GenericValue orderItem : orderItems) {
String orderItemSeqId = orderItem.getString("orderItemSeqId");
String productId = orderItem.getString("productId");
Expand Down Expand Up @@ -6608,8 +6608,8 @@ public static Map<String, Object> approveAllocationPlanItems(DispatchContext dct
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue)context.get("userLogin");
String planId = (String) context.get("planId");
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
try {
String userLoginId = null;
if (userLogin != null) {
Expand Down Expand Up @@ -6674,8 +6674,8 @@ public static Map<String, Object> cancelAllocationPlanItems(DispatchContext dctx
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericValue userLogin = (GenericValue)context.get("userLogin");
String planId = (String) context.get("planId");
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
try {
String userLoginId = null;
if (userLogin != null) {
Expand Down Expand Up @@ -6716,7 +6716,7 @@ public static Map<String, Object> changeAllocationPlanStatus(DispatchContext dct
String planId = (String) context.get("planId");
String statusId = (String) context.get("statusId");
String oldStatusId = null;
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<>();
try {
List<GenericValue> allocationPlanHeaders = EntityQuery.use(delegator).from("AllocationPlanHeader").where("planId", planId).queryList();
if (allocationPlanHeaders == null || UtilValidate.isEmpty(allocationPlanHeaders)) {
Expand All @@ -6739,7 +6739,7 @@ public static Map<String, Object> changeAllocationPlanStatus(DispatchContext dct
if (userLogin != null) {
userLoginId = userLogin.getString("userLoginId");
}
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
serviceCtx.put("planId", planId);
serviceCtx.put("productId", allocationPlanHeader.getString("productId"));
serviceCtx.put("statusId", statusId);
Expand Down Expand Up @@ -6770,7 +6770,7 @@ public static Map<String, Object> changeAllocationPlanItemStatus(DispatchContext
String planItemSeqId = (String) context.get("planItemSeqId");
String statusId = (String) context.get("statusId");
String oldStatusId = null;
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<>();
try {
GenericValue allocationPlanItem = EntityQuery.use(delegator).from("AllocationPlanItem").where("planId", planId, "planItemSeqId", planItemSeqId).queryOne();
if (allocationPlanItem == null) {
Expand All @@ -6792,7 +6792,7 @@ public static Map<String, Object> changeAllocationPlanItemStatus(DispatchContext
if (userLogin != null) {
userLoginId = userLogin.getString("userLoginId");
}
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
serviceCtx.put("planId", planId);
serviceCtx.put("planItemSeqId", planItemSeqId);
serviceCtx.put("productId", allocationPlanItem.getString("productId"));
Expand Down Expand Up @@ -6834,9 +6834,9 @@ public static Map<String, Object> completeAllocationPlanItemByOrderItem(Dispatch
return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
"OrderErrorAllocationPlanIsNotAvailable", locale) + ": [" + orderId + ":"+ orderItemSeqId + "]");
}
List<String> planIds = new ArrayList<String>();
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
List<String> planIds = new ArrayList<>();
Map<String, Object> serviceCtx = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
for (GenericValue allocationPlanItem : allocationPlanItems) {
String planId = allocationPlanItem.getString("planId");
serviceCtx.put("planId", planId);
Expand Down Expand Up @@ -6904,9 +6904,9 @@ public static Map<String, Object> cancelAllocationPlanItemByOrderItem(DispatchCo
return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,
"OrderErrorAllocationPlanIsNotAvailable", locale) + ": [" + orderId + ":"+ orderItemSeqId + "]");
}
List<String> planIds = new ArrayList<String>();
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
List<String> planIds = new ArrayList<>();
Map<String, Object> serviceCtx = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
for (GenericValue allocationPlanItem : allocationPlanItems) {
String planId = allocationPlanItem.getString("planId");
serviceCtx.put("planId", planId);
Expand Down Expand Up @@ -6978,7 +6978,7 @@ public static Map<String, Object> updateAllocatedQuantityOnOrderItemChange(Dispa
BigDecimal allocatedQuantity = allocationPlanItem.getBigDecimal("allocatedQuantity");
if (allocatedQuantity != null && allocatedQuantity.compareTo(revisedQuantity) > 0) {
//Allocated Quantity is more than the revisedQuantity quantity, reduce it and release the excess reservations
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
serviceCtx.put("planId", allocationPlanItem.getString("planId"));
serviceCtx.put("planItemSeqId", allocationPlanItem.getString("planItemSeqId"));
serviceCtx.put("productId", allocationPlanItem.getString("productId"));
Expand Down Expand Up @@ -7014,15 +7014,15 @@ public static Map<String, Object> createAllocationPlanAndItems(DispatchContext d
Map<String, String> itemOrderIdMap = UtilGenerics.checkMap(context.get("itemOrderIdMap"));
Map<String, String> itemOrderItemSeqIdMap = UtilGenerics.checkMap(context.get("itemOrderItemSeqIdMap"));
Map<String, String> itemAllocatedQuantityMap = UtilGenerics.checkMap(context.get("itemAllocatedQuantityMap"));
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<>();
Map<String, Object> serviceCtx = new HashMap<>();
String planId = null;

try {
if (itemListSize > 0) {
String userLoginId = userLogin.getString("userLoginId");
//Create Allocation Plan Header
serviceCtx = new HashMap<String, Object>();
serviceCtx = new HashMap<>();
planId = delegator.getNextSeqId("AllocationPlanHeader");
serviceCtx.put("planId", planId);
serviceCtx.put("productId", productId);
Expand Down Expand Up @@ -7087,7 +7087,7 @@ public static Map<String, Object> isInventoryAllocationRequired(DispatchContext
if (productStore != null && "Y".equals(productStore.getString("allocateInventory"))) {
allocateInventory = true;
}
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<>();
serviceResult.put("conditionReply", allocateInventory);
return serviceResult;
}
Expand All @@ -7103,12 +7103,12 @@ public static Map<String, Object> updateAllocationPlanItems(DispatchContext dctx
Map<String, String> allocatedQuantityMap = UtilGenerics.checkMap(context.get("allocatedQuantityMap"));
Map<String, String> prioritySeqIdMap = UtilGenerics.checkMap(context.get("prioritySeqIdMap"));
Map<String, String> rowSubmitMap = UtilGenerics.checkMap(context.get("rowSubmitMap"));
Map<String, Object> serviceCtx = new HashMap<String, Object>();
Map<String, Object> serviceResult = new HashMap<String, Object>();
Map<String, Object> serviceCtx = new HashMap<>();
Map<String, Object> serviceResult = new HashMap<>();
Boolean changeHeaderStatus = false;
String productId = null;
String facilityId = null;
List<String> reReservePlanItemSeqIdList = new ArrayList<String>();
List<String> reReservePlanItemSeqIdList = new ArrayList<>();

try {
for (String planItemSeqId : productIdMap.keySet()) {
Expand Down

0 comments on commit 948d739

Please sign in to comment.