Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -242,7 +242,7 @@ public class BirtMasterReportServices {
|
||||
String productCategoryId = (String) parameters.get("productCategoryId");
|
||||
productCategoryList.add(productCategoryId);
|
||||
} else if (parameters.get("productStoreId") instanceof String) {
|
||||
productCategoryList = UtilGenerics.checkList(parameters.get("productCategoryId"));
|
||||
productCategoryList = UtilGenerics.cast(parameters.get("productCategoryId"));
|
||||
}
|
||||
// getting productIds in these categories
|
||||
EntityExpr conditionProductCategory = EntityCondition.makeCondition("primaryProductCategoryId", EntityOperator.IN, productCategoryList);
|
||||
@@ -266,7 +266,7 @@ public class BirtMasterReportServices {
|
||||
String productStoreId = (String) parameters.get("productStoreId");
|
||||
productStoreList.add(productStoreId);
|
||||
} else if (parameters.get("productStoreId") instanceof List) {
|
||||
productStoreList = UtilGenerics.checkList(parameters.get("productStoreId"));
|
||||
productStoreList = UtilGenerics.cast(parameters.get("productStoreId"));
|
||||
}
|
||||
// getting list of invoice Ids linked to these productStore
|
||||
EntityExpr conditionProductStoreId = EntityCondition.makeCondition("productStoreId", EntityOperator.IN, productStoreList);
|
||||
|
||||
@@ -125,7 +125,7 @@ public class EbayOrderServices {
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
String externalId = (String) context.get("externalId");
|
||||
List<Map<String, Object>> orderList = UtilGenerics.checkList(context.get("orderList"));
|
||||
List<Map<String, Object>> orderList = UtilGenerics.cast(context.get("orderList"));
|
||||
try {
|
||||
if (UtilValidate.isNotEmpty(orderList)) {
|
||||
Iterator<Map<String, Object>> orderListIter = orderList.iterator();
|
||||
@@ -1047,7 +1047,7 @@ public class EbayOrderServices {
|
||||
return ServiceUtil.returnFailure(UtilProperties.getMessage(resource, "ordersImportFromEbay.paymentIsStillNotReceived", locale));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> orderItemList = UtilGenerics.checkList(context.get("orderItemList"));
|
||||
List<Map<String, Object>> orderItemList = UtilGenerics.cast(context.get("orderItemList"));
|
||||
Iterator<Map<String, Object>> orderItemIter = orderItemList.iterator();
|
||||
while (orderItemIter.hasNext()) {
|
||||
Map<String, Object> orderItem = orderItemIter.next();
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Msg91Services {
|
||||
Delegator delegator = ctx.getDelegator();
|
||||
Map<String, Object> result = ServiceUtil.returnSuccess();
|
||||
|
||||
List<String> numbers = UtilGenerics.checkList(context.get("numbers"));
|
||||
List<String> numbers = UtilGenerics.cast(context.get("numbers"));
|
||||
String message = (String) context.get("message");
|
||||
|
||||
try {
|
||||
|
||||
@@ -155,7 +155,7 @@ public class PricatParseExcelHtmlThread extends AbstractReportThread {
|
||||
try {
|
||||
getReport().print(UtilProperties.getMessage(resource, "StartStoreExcel", getLocale()), InterfaceReport.FORMAT_HEADLINE);
|
||||
ServletFileUpload dfu = new ServletFileUpload(new DiskFileItemFactory(10240, userFolder));
|
||||
fileItems = UtilGenerics.checkList(dfu.parseRequest(request));
|
||||
fileItems = UtilGenerics.cast(dfu.parseRequest(request));
|
||||
} catch (FileUploadException e) {
|
||||
getReport().addError(e);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ public abstract class SolrProductSearch {
|
||||
Collection<SolrInputDocument> docs = new ArrayList<>();
|
||||
|
||||
// Construct Documents
|
||||
List<Map<String, Object>> fieldList = UtilGenerics.<Map<String, Object>> checkList(context.get("fieldList"));
|
||||
List<Map<String, Object>> fieldList = UtilGenerics.cast(context.get("fieldList"));
|
||||
|
||||
Debug.logInfo("Solr: Generating and adding " + fieldList.size() + " documents to solr index", module);
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ public final class SolrUtil {
|
||||
|
||||
// add catalog
|
||||
if (context.get("catalog") != null) {
|
||||
List<String> catalog = UtilGenerics.<String>checkList(context.get("catalog"));
|
||||
List<String> catalog = UtilGenerics.cast(context.get("catalog"));
|
||||
for (String c : catalog) {
|
||||
doc1.addField("catalog", c);
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public final class SolrUtil {
|
||||
|
||||
// add categories
|
||||
if (context.get("category") != null) {
|
||||
List<String> category = UtilGenerics.<String>checkList(context.get("category"));
|
||||
List<String> category = UtilGenerics.cast(context.get("category"));
|
||||
Iterator<String> catIter = category.iterator();
|
||||
while (catIter.hasNext()) {
|
||||
String cat = catIter.next();
|
||||
@@ -197,7 +197,7 @@ public final class SolrUtil {
|
||||
|
||||
// add attributes
|
||||
if (context.get("attributes") != null) {
|
||||
List<String> attributes = UtilGenerics.<String>checkList(context.get("attributes"));
|
||||
List<String> attributes = UtilGenerics.cast(context.get("attributes"));
|
||||
Iterator<String> attrIter = attributes.iterator();
|
||||
while (attrIter.hasNext()) {
|
||||
String attr = attrIter.next();
|
||||
|
||||
Reference in New Issue
Block a user