svn commit: r1863501 [3/3] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/ applications/accounting/src/main/java/or...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1863501 [3/3] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/ applications/accounting/src/main/java/or...

mthl
Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleServletAccessor.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleServletAccessor.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleServletAccessor.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleServletAccessor.java Sat Jul 20 16:35:13 2019
@@ -294,7 +294,7 @@ public class FlexibleServletAccessor<T>
         public void put(ServletRequest request, T value) {
             if (fma == null) {
                 if (isListReference) {
-                    List<T> lst = UtilGenerics.checkList(request.getAttribute(attributeName));
+                    List<T> lst = UtilGenerics.cast(request.getAttribute(attributeName));
                     putInList(lst, value);
                 } else {
                     request.setAttribute(attributeName, value);
@@ -302,7 +302,7 @@ public class FlexibleServletAccessor<T>
             } else {
                 Object theObj = request.getAttribute(attributeName);
                 if (isListReference) {
-                    List<T> lst = UtilGenerics.checkList(theObj);
+                    List<T> lst = UtilGenerics.cast(theObj);
                     fma.put(UtilGenerics.checkMap(lst.get(listIndex), String.class, Object.class), value);
                 } else {
                     fma.put(UtilGenerics.checkMap(theObj, String.class, Object.class), value);
@@ -313,7 +313,7 @@ public class FlexibleServletAccessor<T>
         public void put(HttpSession session, T value) {
             if (fma == null) {
                 if (isListReference) {
-                    List<T> lst = UtilGenerics.checkList(session.getAttribute(attributeName));
+                    List<T> lst = UtilGenerics.cast(session.getAttribute(attributeName));
                     putInList(lst, value);
                 } else {
                     session.setAttribute(attributeName, value);
@@ -321,7 +321,7 @@ public class FlexibleServletAccessor<T>
             } else {
                 Object theObj = session.getAttribute(attributeName);
                 if (isListReference) {
-                    List<T> lst = UtilGenerics.checkList(theObj);
+                    List<T> lst = UtilGenerics.cast(theObj);
                     fma.put(UtilGenerics.checkMap(lst.get(listIndex), String.class, Object.class), value);
                 } else {
                     fma.put(UtilGenerics.checkMap(theObj, String.class, Object.class), value);
@@ -333,13 +333,13 @@ public class FlexibleServletAccessor<T>
             if (fma != null) {
                 Object theObj = request.getAttribute(attributeName);
                 if (isListReference) {
-                    List<Object> lst = UtilGenerics.checkList(theObj);
+                    List<Object> lst = UtilGenerics.cast(theObj);
                     return fma.remove(UtilGenerics.checkMap(lst.get(listIndex), String.class, Object.class));
                 }
                 return fma.remove(UtilGenerics.checkMap(theObj, String.class, Object.class));
             }
             if (isListReference) {
-                List<Object> lst = UtilGenerics.checkList(request.getAttribute(attributeName));
+                List<Object> lst = UtilGenerics.cast(request.getAttribute(attributeName));
                 return UtilGenerics.<T>cast(lst.remove(listIndex));
             }
             Object theValue = request.getAttribute(attributeName);
@@ -351,13 +351,13 @@ public class FlexibleServletAccessor<T>
             if (fma != null) {
                 Object theObj = session.getAttribute(attributeName);
                 if (isListReference) {
-                    List<Object> lst = UtilGenerics.checkList(theObj);
+                    List<Object> lst = UtilGenerics.cast(theObj);
                     return fma.remove(UtilGenerics.checkMap(lst.get(listIndex), String.class, Object.class));
                 }
                 return fma.remove(UtilGenerics.checkMap(theObj, String.class, Object.class));
             }
             if (isListReference) {
-                List<Object> lst = UtilGenerics.checkList(session.getAttribute(attributeName));
+                List<Object> lst = UtilGenerics.cast(session.getAttribute(attributeName));
                 return UtilGenerics.<T>cast(lst.remove(listIndex));
             }
             Object theValue = session.getAttribute(attributeName);

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java Sat Jul 20 16:35:13 2019
@@ -378,7 +378,7 @@ public final class FreeMarkerWorker {
             if (o instanceof Map<?, ?>) {
                 o = UtilMisc.makeMapWritable(UtilGenerics.cast(o));
             } else if (o instanceof List<?>) {
-                o = UtilMisc.makeListWritable(UtilGenerics.checkList(o));
+                o = UtilMisc.makeListWritable(UtilGenerics.cast(o));
             }
             saveMap.put(key, o);
         }
@@ -391,7 +391,7 @@ public final class FreeMarkerWorker {
             if (o instanceof Map<?, ?>) {
                 o = UtilMisc.makeMapWritable(UtilGenerics.cast(o));
             } else if (o instanceof List<?>) {
-                o = UtilMisc.makeListWritable(UtilGenerics.checkList(o));
+                o = UtilMisc.makeListWritable(UtilGenerics.cast(o));
             }
             saveMap.put(key, o);
         }
@@ -406,7 +406,7 @@ public final class FreeMarkerWorker {
                 context.put(key, UtilMisc.makeMapWritable(UtilGenerics.cast(o)));
             } else if (o instanceof List<?>) {
                 List<Object> list = new ArrayList<>();
-                list.addAll(UtilGenerics.checkList(o));
+                list.addAll(UtilGenerics.cast(o));
                 context.put(key, list);
             } else {
                 context.put(key, o);

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/FindServices.java Sat Jul 20 16:35:13 2019
@@ -504,7 +504,7 @@ public class FindServices {
         Map<String, ?> inputFields = checkMap(context.get("inputFields"), String.class, Object.class); // Input
         String noConditionFind = (String) context.get("noConditionFind");
         String distinct = (String) context.get("distinct");
-        List<String> fieldList =  UtilGenerics.<String>checkList(context.get("fieldList"));
+        List<String> fieldList =  UtilGenerics.cast(context.get("fieldList"));
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
         Delegator delegator = dctx.getDelegator();
@@ -671,7 +671,7 @@ public class FindServices {
         List<String> orderByList = checkCollection(context.get("orderByList"), String.class);
         boolean noConditionFind = "Y".equals(context.get("noConditionFind"));
         boolean distinct = "Y".equals(context.get("distinct"));
-        List<String> fieldList =  UtilGenerics.checkList(context.get("fieldList"));
+        List<String> fieldList =  UtilGenerics.cast(context.get("fieldList"));
         Locale locale = (Locale) context.get("locale");
         Set<String> fieldSet = null;
         if (fieldList != null) {

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/EmailServices.java Sat Jul 20 16:35:13 2019
@@ -112,7 +112,7 @@ public class EmailServices {
 
         String partyId = (String) context.get("partyId");
         String body = (String) context.get("body");
-        List<Map<String, Object>> bodyParts = UtilGenerics.checkList(context.get("bodyParts"));
+        List<Map<String, Object>> bodyParts = UtilGenerics.cast(context.get("bodyParts"));
         GenericValue userLogin = (GenericValue) context.get("userLogin");
 
         results.put("communicationEventId", communicationEventId);
@@ -436,8 +436,8 @@ public class EmailServices {
         String bodyScreenUri = (String) serviceContext.remove("bodyScreenUri");
         String xslfoAttachScreenLocationParam = (String) serviceContext.remove("xslfoAttachScreenLocation");
         String attachmentNameParam = (String) serviceContext.remove("attachmentName");
-        List<String> xslfoAttachScreenLocationListParam = UtilGenerics.checkList(serviceContext.remove("xslfoAttachScreenLocationList"));
-        List<String> attachmentNameListParam = UtilGenerics.checkList(serviceContext.remove("attachmentNameList"));
+        List<String> xslfoAttachScreenLocationListParam = UtilGenerics.cast(serviceContext.remove("xslfoAttachScreenLocationList"));
+        List<String> attachmentNameListParam = UtilGenerics.cast(serviceContext.remove("attachmentNameList"));
         VisualTheme visualTheme = (VisualTheme) rServiceContext.get("visualTheme");
         if (visualTheme == null) {
             visualTheme = ThemeFactory.resolveVisualTheme(null);
@@ -460,7 +460,7 @@ public class EmailServices {
         
         List<String> attachmentTypeList = new LinkedList<>();
         String attachmentTypeParam = (String) serviceContext.remove("attachmentType");
-        List<String> attachmentTypeListParam = UtilGenerics.checkList(serviceContext.remove("attachmentTypeList"));
+        List<String> attachmentTypeListParam = UtilGenerics.cast(serviceContext.remove("attachmentTypeList"));
         if (UtilValidate.isNotEmpty(attachmentTypeParam)) {
             attachmentTypeList.add(attachmentTypeParam);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ContextHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ContextHelper.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ContextHelper.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ContextHelper.java Sat Jul 20 16:35:13 2019
@@ -113,13 +113,13 @@ public final class ContextHelper {
     public List<String> getErrorMessages() {
         List<String> errorMessages = null;
         if (isService()) {
-            errorMessages = UtilGenerics.checkList(getResults().get(ModelService.ERROR_MESSAGE_LIST));
+            errorMessages = UtilGenerics.cast(getResults().get(ModelService.ERROR_MESSAGE_LIST));
             if (errorMessages == null) {
                 errorMessages = new LinkedList<>();
                 getResults().put(ModelService.ERROR_MESSAGE_LIST, errorMessages);
             }
         } else {
-            errorMessages = UtilGenerics.checkList(getResults().get("_error_message_list_"));
+            errorMessages = UtilGenerics.cast(getResults().get("_error_message_list_"));
             if (errorMessages == null) {
                 errorMessages = new LinkedList<>();
                 getResults().put("_error_message_list_", errorMessages);

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ScriptHelperImpl.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ScriptHelperImpl.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ScriptHelperImpl.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/scripting/ScriptHelperImpl.java Sat Jul 20 16:35:13 2019
@@ -126,7 +126,7 @@ public final class ScriptHelperImpl impl
             Debug.logWarning(e, errMsg, module);
             throw new ScriptException(errMsg);
         }
-        toMap.putAll(modelService.makeValid(inputMap, ModelService.IN_PARAM, true, UtilGenerics.checkList(ctxHelper.getErrorMessages()), ctxHelper.getTimeZone(), ctxHelper.getLocale()));
+        toMap.putAll(modelService.makeValid(inputMap, ModelService.IN_PARAM, true, UtilGenerics.cast(ctxHelper.getErrorMessages()), ctxHelper.getTimeZone(), ctxHelper.getLocale()));
         return toMap;
     }
 
@@ -158,7 +158,7 @@ public final class ScriptHelperImpl impl
     @Override
     public List<Map<String, Object>> findList(String entityName, Map<String, ? extends Object> fields) throws ScriptException {
         try {
-            return UtilGenerics.checkList(ctxHelper.getDelegator().findByAnd(entityName, fields, null, false));
+            return UtilGenerics.cast(ctxHelper.getDelegator().findByAnd(entityName, fields, null, false));
         } catch (GenericEntityException e) {
             String errMsg = "Error running script " + ctxHelper.getScriptName() + ": Problem invoking the findList method: " + e.getMessage();
             Debug.logWarning(e, errMsg, module);
@@ -179,7 +179,7 @@ public final class ScriptHelperImpl impl
         }
         boolean useCache = "true".equals(args.get("useCache"));
         boolean autoFieldMap = !"false".equals(args.get("autoFieldMap"));
-        List<String> selectFieldList = UtilGenerics.checkList(args.get("selectFieldList"));
+        List<String> selectFieldList = UtilGenerics.cast(args.get("selectFieldList"));
         ModelEntity modelEntity = ctxHelper.getDelegator().getModelEntity(entityName);
         if (modelEntity == null) {
             throw new ScriptException("Error running script " + ctxHelper.getScriptName() + " - no entity definition found for entity name [" + entityName + "]");

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityConditionBuilder.java Sat Jul 20 16:35:13 2019
@@ -138,7 +138,7 @@ public class EntityConditionBuilder exte
         } else if (child instanceof ConditionHolder) {
             tempList.add(((ConditionHolder)child).condition);
         } else {
-            tempList.addAll(UtilGenerics.<EntityCondition>checkList(child));
+            tempList.addAll(UtilGenerics.cast(child));
         }
         holder.condition = EntityCondition.makeCondition(tempList, parentConList.getOperator());
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java Sat Jul 20 16:35:13 2019
@@ -18,8 +18,6 @@
  *******************************************************************************/
 package org.apache.ofbiz.entityext.permission;
 
-import static org.apache.ofbiz.base.util.UtilGenerics.checkList;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -35,6 +33,7 @@ import javax.servlet.http.HttpSession;
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.StringUtil;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.base.util.UtilXml;
@@ -135,7 +134,7 @@ public class EntityPermissionChecker {
             if (!passed && displayFailCond) {
                  String errMsg =  "Permission is denied. \nThese are the conditions of which one must be met:\n"
                      + permissionConditionGetter.dumpAsText();
-                 List<Object> errorMessageList = checkList(context.get("errorMessageList"));
+                 List<Object> errorMessageList = UtilGenerics.cast(context.get("errorMessageList"));
                  errorMessageList.add(errMsg);
             }
         } catch (GenericEntityException e) {

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java Sat Jul 20 16:35:13 2019
@@ -479,7 +479,7 @@ public final class SimpleMethod extends
                 forceError = true;
                 summaryErrorStringBuffer.append(errorMsg);
             }
-            List<Object> tempErrorMsgList = UtilGenerics.checkList(methodContext.getEnv(eventErrorMessageListName));
+            List<Object> tempErrorMsgList = UtilGenerics.cast(methodContext.getEnv(eventErrorMessageListName));
             if (UtilValidate.isNotEmpty(tempErrorMsgList)) {
                 methodContext.getRequest().setAttribute("_ERROR_MESSAGE_LIST_", tempErrorMsgList);
                 forceError = true;
@@ -490,7 +490,7 @@ public final class SimpleMethod extends
             if (UtilValidate.isNotEmpty(eventMsg)) {
                 methodContext.getRequest().setAttribute("_EVENT_MESSAGE_", eventMsg);
             }
-            List<String> eventMsgList = UtilGenerics.checkList(methodContext.getEnv(eventEventMessageListName));
+            List<String> eventMsgList = UtilGenerics.cast(methodContext.getEnv(eventEventMessageListName));
             if (UtilValidate.isNotEmpty(eventMsgList)) {
                 methodContext.getRequest().setAttribute("_EVENT_MESSAGE_LIST_", eventMsgList);
             }
@@ -517,7 +517,7 @@ public final class SimpleMethod extends
                 forceError = true;
                 summaryErrorStringBuffer.append(errorMsg);
             }
-            List<Object> errorMsgList = UtilGenerics.checkList(methodContext.getEnv(serviceErrorMessageListName));
+            List<Object> errorMsgList = UtilGenerics.cast(methodContext.getEnv(serviceErrorMessageListName));
             if (UtilValidate.isNotEmpty(errorMsgList)) {
                 methodContext.putResult(ModelService.ERROR_MESSAGE_LIST, errorMsgList);
                 forceError = true;
@@ -535,7 +535,7 @@ public final class SimpleMethod extends
             if (UtilValidate.isNotEmpty(successMsg)) {
                 methodContext.putResult(ModelService.SUCCESS_MESSAGE, successMsg);
             }
-            List<Object> successMsgList = UtilGenerics.checkList(methodContext.getEnv(serviceSuccessMessageListName));
+            List<Object> successMsgList = UtilGenerics.cast(methodContext.getEnv(serviceSuccessMessageListName));
             if (UtilValidate.isNotEmpty(successMsgList)) {
                 methodContext.putResult(ModelService.SUCCESS_MESSAGE_LIST, successMsgList);
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallService.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallService.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallService.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/callops/CallService.java Sat Jul 20 16:35:13 2019
@@ -294,7 +294,7 @@ public final class CallService extends M
         if (result.containsKey(ModelService.ERROR_MESSAGE)) {
             errorMessage = ServiceUtil.makeErrorMessage(result, messagePrefixStr, messageSuffixStr, errorPrefixStr, errorSuffixStr);
         } else if (result.containsKey(ModelService.ERROR_MESSAGE_LIST)) {
-            errorMessageList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST));
+            errorMessageList = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_LIST));
         }
         if ((UtilValidate.isNotEmpty(errorMessage) || UtilValidate.isNotEmpty(errorMessageList)) && breakOnError) {
             if (methodContext.getMethodType() == MethodContext.EVENT) {

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java Sat Jul 20 16:35:13 2019
@@ -132,7 +132,7 @@ public final class ServiceUtil {
                 errorList.add(nestedResult.get(ModelService.ERROR_MESSAGE));
             }
             if (nestedResult.get(ModelService.ERROR_MESSAGE_LIST) != null) {
-                errorList.addAll(UtilGenerics.checkList(nestedResult.get(ModelService.ERROR_MESSAGE_LIST)));
+                errorList.addAll(UtilGenerics.cast(nestedResult.get(ModelService.ERROR_MESSAGE_LIST)));
             }
             if (nestedResult.get(ModelService.ERROR_MESSAGE_MAP) != null) {
                 errorMap.putAll(UtilGenerics.cast(nestedResult.get(ModelService.ERROR_MESSAGE_MAP)));
@@ -248,7 +248,7 @@ public final class ServiceUtil {
         }
 
         if (result.get(ModelService.ERROR_MESSAGE_LIST) != null) {
-            List<? extends Object> errors = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST));
+            List<? extends Object> errors = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_LIST));
             for (Object message: errors) {
                 // NOTE: this MUST use toString and not cast to String because it may be a MessageString object
                 String curMessage = message.toString();
@@ -268,7 +268,7 @@ public final class ServiceUtil {
             return null;
         }
         String errorMsg = (String) result.get(ModelService.ERROR_MESSAGE);
-        List<? extends Object> errorMsgList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST));
+        List<? extends Object> errorMsgList = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_LIST));
         Map<String, ? extends Object> errorMsgMap = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_MAP));
         StringBuilder outMsg = new StringBuilder();
 
@@ -314,7 +314,7 @@ public final class ServiceUtil {
             return "";
         }
         String successMsg = (String) result.get(ModelService.SUCCESS_MESSAGE);
-        List<? extends Object> successMsgList = UtilGenerics.checkList(result.get(ModelService.SUCCESS_MESSAGE_LIST));
+        List<? extends Object> successMsgList = UtilGenerics.cast(result.get(ModelService.SUCCESS_MESSAGE_LIST));
         StringBuilder outMsg = new StringBuilder();
 
         outMsg.append(makeMessageList(successMsgList, msgPrefix, msgSuffix));
@@ -383,7 +383,7 @@ public final class ServiceUtil {
 
         //See if there is a message list
         if (callResult.containsKey(ModelService.ERROR_MESSAGE_LIST)) {
-            newList = UtilGenerics.checkList(callResult.get(ModelService.ERROR_MESSAGE_LIST));
+            newList = UtilGenerics.cast(callResult.get(ModelService.ERROR_MESSAGE_LIST));
             targetList.addAll(newList);
         }
 

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaAction.java Sat Jul 20 16:35:13 2019
@@ -184,7 +184,7 @@ public class ServiceEcaAction implements
         if ((!success || resultToResult) && UtilValidate.isNotEmpty(actionResult)) {
             String errorMessage = (String) actionResult.get(ModelService.ERROR_MESSAGE);
             String failMessage = (String) actionResult.get("failMessage");
-            List<? extends Object> errorMessageList = UtilGenerics.checkList(actionResult.get(ModelService.ERROR_MESSAGE_LIST));
+            List<? extends Object> errorMessageList = UtilGenerics.cast(actionResult.get(ModelService.ERROR_MESSAGE_LIST));
             Map<String, ? extends Object> errorMessageMap = UtilGenerics.cast(actionResult.get(ModelService.ERROR_MESSAGE_MAP));
 
             // do something with the errorMessage
@@ -192,7 +192,7 @@ public class ServiceEcaAction implements
                 if (UtilValidate.isEmpty(result.get(ModelService.ERROR_MESSAGE))) {
                     result.put(ModelService.ERROR_MESSAGE, errorMessage);
                 } else {
-                    List<Object> origErrorMessageList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST));
+                    List<Object> origErrorMessageList = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_LIST));
                     if (origErrorMessageList == null) {
                         origErrorMessageList = new LinkedList<>();
                         result.put(ModelService.ERROR_MESSAGE_LIST, origErrorMessageList);
@@ -202,7 +202,7 @@ public class ServiceEcaAction implements
             }
             // do something with the errorMessageList
             if (UtilValidate.isNotEmpty(errorMessageList)) {
-                List<Object> origErrorMessageList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST));
+                List<Object> origErrorMessageList = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_LIST));
                 if (origErrorMessageList == null) {
                     result.put(ModelService.ERROR_MESSAGE_LIST, errorMessageList);
                 } else {

Modified: ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ServiceTest.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ServiceTest.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ServiceTest.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ServiceTest.java Sat Jul 20 16:35:13 2019
@@ -68,7 +68,7 @@ public class ServiceTest extends OFBizTe
             }
 
             // do something with the errorMessageList
-            List<Object> errorMessageList = UtilGenerics.checkList(serviceResult.get(ModelService.ERROR_MESSAGE_LIST));
+            List<Object> errorMessageList = UtilGenerics.cast(serviceResult.get(ModelService.ERROR_MESSAGE_LIST));
             if (UtilValidate.isNotEmpty(errorMessageList)) {
                 for (Object message: errorMessageList) {
                     result.addFailure(this, new AssertionFailedError(message.toString()));

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java Sat Jul 20 16:35:13 2019
@@ -203,7 +203,7 @@ public class LoginWorker {
         // user is logged in; check to see if they have globally logged out if not
         // check if they have permission for this login attempt; if not log them out
         if (userLogin != null) {
-            List<Object> errorMessageList = UtilGenerics.checkList(request.getAttribute("_ERROR_MESSAGE_LIST"));
+            List<Object> errorMessageList = UtilGenerics.cast(request.getAttribute("_ERROR_MESSAGE_LIST"));
             if (!hasBasePermission(userLogin, request) || isFlaggedLoggedOut(userLogin, userLogin.getDelegator())) {
                 if (errorMessageList == null) {
                     errorMessageList = new LinkedList<>();
@@ -253,7 +253,7 @@ public class LoginWorker {
             }
         }
         if (userLoginHistory != null) {
-            List<Object> errorMessageList = UtilGenerics.checkList(request.getAttribute("_ERROR_MESSAGE_LIST"));
+            List<Object> errorMessageList = UtilGenerics.cast(request.getAttribute("_ERROR_MESSAGE_LIST"));
             if (errorMessageList == null) {
                 errorMessageList = new LinkedList<>();
                 request.setAttribute("_ERROR_MESSAGE_LIST_", errorMessageList);

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceMultiEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceMultiEventHandler.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceMultiEventHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceMultiEventHandler.java Sat Jul 20 16:35:13 2019
@@ -348,7 +348,7 @@ public class ServiceMultiEventHandler im
                         }
                     }
                     if (UtilValidate.isNotEmpty(result.get(ModelService.SUCCESS_MESSAGE_LIST))) {
-                        List<String> newSuccessMessages = UtilGenerics.<String>checkList(result.get(ModelService.SUCCESS_MESSAGE_LIST));
+                        List<String> newSuccessMessages = UtilGenerics.cast(result.get(ModelService.SUCCESS_MESSAGE_LIST));
                         for (int j = 0; j < newSuccessMessages.size(); j++) {
                             String newSuccessMessage = newSuccessMessages.get(j);
                             if (!successMessages.contains(newSuccessMessage)) {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormField.java Sat Jul 20 16:35:13 2019
@@ -3070,7 +3070,7 @@ public class ModelFormField {
 
         @Override
         public void addOptionValues(List<OptionValue> optionValues, Map<String, Object> context, Delegator delegator) {
-            List<? extends Object> dataList = UtilGenerics.checkList(this.listAcsr.get(context));
+            List<? extends Object> dataList = UtilGenerics.cast(this.listAcsr.get(context));
             if (dataList != null && dataList.size() != 0) {
                 for (Object data : dataList) {
                     Map<String, Object> localContext = new HashMap<>();

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTree.java Sat Jul 20 16:35:13 2019
@@ -602,7 +602,7 @@ public class ModelTree extends ModelWidg
                                 newContext.putAll(val);
                             }
                             String targetEntityId = null;
-                            List<String> targetNodeTrail = UtilGenerics.checkList(context.get("targetNodeTrail"));
+                            List<String> targetNodeTrail = UtilGenerics.cast(context.get("targetNodeTrail"));
                             if (newDepth < targetNodeTrail.size()) {
                                 targetEntityId = targetNodeTrail.get(newDepth);
                             }
@@ -627,7 +627,7 @@ public class ModelTree extends ModelWidg
 
         public boolean showPeers(int currentDepth, Map<String, Object> context) {
             int trailSize = 0;
-            List<?> trail = UtilGenerics.checkList(context.get("targetNodeTrail"));
+            List<?> trail = UtilGenerics.cast(context.get("targetNodeTrail"));
             int openDepth = modelTree.getOpenDepth();
             int postTrailOpenDepth = modelTree.getPostTrailOpenDepth();
             if (trail != null) {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTreeAction.java Sat Jul 20 16:35:13 2019
@@ -181,7 +181,7 @@ public abstract class ModelTreeAction ex
                     this.getModelSubNode().setListIterator(listIt, context);
                 } else {
                     if (obj instanceof List<?>) {
-                        List<? extends Map<String, ? extends Object>> list = UtilGenerics.checkList(obj);
+                        List<? extends Map<String, ? extends Object>> list = UtilGenerics.cast(obj);
                         this.getModelSubNode().setListIterator(list.listIterator(), context);
                     }
                 }
@@ -315,7 +315,7 @@ public abstract class ModelTreeAction ex
                     this.getModelSubNode().setListIterator(listIt, context);
                 } else {
                     if (obj instanceof List<?>) {
-                        List<? extends Map<String, ? extends Object>> list = UtilGenerics.checkList(obj);
+                        List<? extends Map<String, ? extends Object>> list = UtilGenerics.cast(obj);
                         this.getModelSubNode().setListIterator(list.listIterator(), context);
                     }
                 }
@@ -418,7 +418,7 @@ public abstract class ModelTreeAction ex
                 String valueName = valueNameExdr.expandString(context);
                 if (this.getModelSubNode() != null) {
                     if (UtilValidate.isNotEmpty(resultMapListName)) {
-                        List<? extends Map<String, ? extends Object>> lst = UtilGenerics.checkList(result.get(resultMapListName));
+                        List<? extends Map<String, ? extends Object>> lst = UtilGenerics.cast(result.get(resultMapListName));
                         if (lst != null) {
                             if (lst instanceof ListIterator<?>) {
                                 ListIterator<? extends Map<String, ? extends Object>> listIt = UtilGenerics.cast(lst);

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuWrapTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuWrapTransform.java?rev=1863501&r1=1863500&r2=1863501&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuWrapTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/MenuWrapTransform.java Sat Jul 20 16:35:13 2019
@@ -92,7 +92,7 @@ public class MenuWrapTransform implement
 
         Map<String, Object> checkedArgs = UtilGenerics.cast(args);
         FreeMarkerWorker.overrideWithArgs(templateCtx, checkedArgs);
-        List<Map<String, ? extends Object>> trail = UtilGenerics.checkList(templateCtx.get("globalNodeTrail"));
+        List<Map<String, ? extends Object>> trail = UtilGenerics.cast(templateCtx.get("globalNodeTrail"));
         String contentAssocPredicateId = (String)templateCtx.get("contentAssocPredicateId");
         String strNullThruDatesOnly = (String)templateCtx.get("nullThruDatesOnly");
         Boolean nullThruDatesOnly = (strNullThruDatesOnly != null && "true".equalsIgnoreCase(strNullThruDatesOnly)) ? Boolean.TRUE :Boolean.FALSE;