Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java Sat Jul 20 16:32:34 2019 @@ -1498,7 +1498,7 @@ public final class UtilHttp { public static String stashParameterMap(HttpServletRequest request) { HttpSession session = request.getSession(); - Map<String, Map<String, Object>> paramMapStore = UtilGenerics.checkMap(session.getAttribute("_PARAM_MAP_STORE_")); + Map<String, Map<String, Object>> paramMapStore = UtilGenerics.cast(session.getAttribute("_PARAM_MAP_STORE_")); if (paramMapStore == null) { paramMapStore = new HashMap<>(); session.setAttribute("_PARAM_MAP_STORE_", paramMapStore); @@ -1511,7 +1511,7 @@ public final class UtilHttp { public static void restoreStashedParameterMap(HttpServletRequest request, String paramMapId) { HttpSession session = request.getSession(); - Map<String, Map<String, Object>> paramMapStore = UtilGenerics.checkMap(session.getAttribute("_PARAM_MAP_STORE_")); + Map<String, Map<String, Object>> paramMapStore = UtilGenerics.cast(session.getAttribute("_PARAM_MAP_STORE_")); if (paramMapStore != null) { Map<String, Object> paramMap = paramMapStore.get(paramMapId); if (paramMap != null) { Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java Sat Jul 20 16:32:34 2019 @@ -130,7 +130,7 @@ public final class UtilMisc { @SuppressWarnings("unchecked") public static <K, V> Map<K, V> toMap(Supplier<Map<K, V>> constructor, Object... kvs) { if (kvs.length == 1 && kvs[0] instanceof Map) { - return UtilGenerics.<K, V>checkMap(kvs[0]); + return UtilGenerics.cast(kvs[0]); } if (kvs.length % 2 == 1) { IllegalArgumentException e = new IllegalArgumentException( @@ -221,7 +221,7 @@ public final class UtilMisc { * Assuming outerMap not null; if null will throw a NullPointerException */ public static <K, IK, V> Map<IK, V> getMapFromMap(Map<K, Object> outerMap, K key) { - Map<IK, V> innerMap = UtilGenerics.<IK, V>checkMap(outerMap.get(key)); + Map<IK, V> innerMap = UtilGenerics.cast(outerMap.get(key)); if (innerMap == null) { innerMap = new HashMap<>(); outerMap.put(key, innerMap); Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilPlist.java Sat Jul 20 16:32:34 2019 @@ -19,7 +19,6 @@ package org.apache.ofbiz.base.util; import static org.apache.ofbiz.base.util.UtilGenerics.checkList; -import static org.apache.ofbiz.base.util.UtilGenerics.checkMap; import java.io.BufferedWriter; import java.io.File; @@ -53,7 +52,7 @@ public final class UtilPlist { writer.print(" = "); if (value instanceof Map<?, ?>) { writer.println(); - Map<String, Object> map = checkMap(value); + Map<String, Object> map = UtilGenerics.cast(value); writePlistPropertyMap(map, indentLevel, writer, false); } else if (value instanceof List<?>) { List<Object> list = checkList(value); @@ -90,7 +89,7 @@ public final class UtilPlist { while (propertyValueIter.hasNext()) { Object propertyValue = propertyValueIter.next(); if (propertyValue instanceof Map<?, ?>) { - Map<String, Object> propertyMap = checkMap(propertyValue); + Map<String, Object> propertyMap = UtilGenerics.cast(propertyValue); writePlistPropertyMap(propertyMap, indentLevel + 1, writer, propertyValueIter.hasNext()); } else { writer.print(propertyValue); @@ -114,7 +113,7 @@ public final class UtilPlist { writer.print(name); writer.println("</key>"); if (value instanceof Map<?, ?>) { - Map<String, Object> map = checkMap(value); + Map<String, Object> map = UtilGenerics.cast(value); writePlistPropertyMapXml(map, indentLevel, writer); } else if (value instanceof List<?>) { List<Object> list = checkList(value); @@ -152,7 +151,7 @@ public final class UtilPlist { while (propertyValueIter.hasNext()) { Object propertyValue = propertyValueIter.next(); if (propertyValue instanceof Map<?, ?>) { - Map<String, Object> propertyMap = checkMap(propertyValue); + Map<String, Object> propertyMap = UtilGenerics.cast(propertyValue); writePlistPropertyMapXml(propertyMap, indentLevel, writer); } else { for (int i = 0; i < indentLevel; i++) { 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -258,7 +258,7 @@ public class FlexibleServletAccessor<T> } if (fma != null) { - return fma.get(UtilGenerics.<String, Object>checkMap(theValue)); + return fma.get(UtilGenerics.cast(theValue)); } return UtilGenerics.<T>cast(theValue); } @@ -273,7 +273,7 @@ public class FlexibleServletAccessor<T> } if (fma != null) { - return fma.get(UtilGenerics.<String, Object>checkMap(theValue)); + return fma.get(UtilGenerics.cast(theValue)); } return UtilGenerics.<T>cast(theValue); } Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapComparator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapComparator.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapComparator.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/MapComparator.java Sat Jul 20 16:32:34 2019 @@ -77,8 +77,8 @@ public class MapComparator implements Co FlexibleMapAccessor<Object> fmaKey = UtilGenerics.cast(key); ascending = fmaKey.getIsAscending(); - o1 = fmaKey.get(UtilGenerics.<String, Object>checkMap(map1)); - o2 = fmaKey.get(UtilGenerics.<String, Object>checkMap(map2)); + o1 = fmaKey.get(UtilGenerics.cast(map1)); + o2 = fmaKey.get(UtilGenerics.cast(map2)); } else { if (key instanceof String) { String keyStr = (String) key; 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -376,7 +376,7 @@ public final class FreeMarkerWorker { for (String key: saveKeyNames) { Object o = context.get(key); if (o instanceof Map<?, ?>) { - o = UtilMisc.makeMapWritable(UtilGenerics.checkMap(o)); + o = UtilMisc.makeMapWritable(UtilGenerics.cast(o)); } else if (o instanceof List<?>) { o = UtilMisc.makeListWritable(UtilGenerics.checkList(o)); } @@ -389,7 +389,7 @@ public final class FreeMarkerWorker { for (String key: saveKeyNames) { Object o = context.get(key); if (o instanceof Map<?, ?>) { - o = UtilMisc.makeMapWritable(UtilGenerics.checkMap(o)); + o = UtilMisc.makeMapWritable(UtilGenerics.cast(o)); } else if (o instanceof List<?>) { o = UtilMisc.makeListWritable(UtilGenerics.checkList(o)); } @@ -403,7 +403,7 @@ public final class FreeMarkerWorker { String key = entry.getKey(); Object o = entry.getValue(); if (o instanceof Map<?, ?>) { - context.put(key, UtilMisc.makeMapWritable(UtilGenerics.checkMap(o))); + context.put(key, UtilMisc.makeMapWritable(UtilGenerics.cast(o))); } else if (o instanceof List<?>) { List<Object> list = new ArrayList<>(); list.addAll(UtilGenerics.checkList(o)); Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonEvents.java Sat Jul 20 16:32:34 2019 @@ -369,7 +369,7 @@ public class CommonEvents { response.setContentType("image/jpeg"); ImageIO.write(bufferedImage, "jpg", response.getOutputStream()); HttpSession session = request.getSession(); - Map<String, String> captchaCodeMap = UtilGenerics.checkMap(session.getAttribute("_CAPTCHA_CODE_")); + Map<String, String> captchaCodeMap = UtilGenerics.cast(session.getAttribute("_CAPTCHA_CODE_")); if (captchaCodeMap == null) { captchaCodeMap = new HashMap<>(); session.setAttribute("_CAPTCHA_CODE_", captchaCodeMap); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -385,7 +385,7 @@ public class EmailServices { // pretty simple, get the content and then call the sendMail method below Map<String, Object> sendMailContext = UtilMisc.makeMapWritable(rcontext); String bodyUrl = (String) sendMailContext.remove("bodyUrl"); - Map<String, Object> bodyUrlParameters = UtilGenerics.checkMap(sendMailContext.remove("bodyUrlParameters")); + Map<String, Object> bodyUrlParameters = UtilGenerics.cast(sendMailContext.remove("bodyUrlParameters")); Locale locale = (Locale) rcontext.get("locale"); LocalDispatcher dispatcher = ctx.getDispatcher(); @@ -469,7 +469,7 @@ public class EmailServices { } Locale locale = (Locale) serviceContext.get("locale"); - Map<String, Object> bodyParameters = UtilGenerics.checkMap(serviceContext.remove("bodyParameters")); + Map<String, Object> bodyParameters = UtilGenerics.cast(serviceContext.remove("bodyParameters")); if (bodyParameters == null) { bodyParameters = MapStack.create(); } Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/email/NotificationServices.java Sat Jul 20 16:32:34 2019 @@ -188,7 +188,7 @@ public class NotificationServices { public static Map<String, Object> prepareNotification(DispatchContext ctx, Map<String, ? extends Object> context) { Delegator delegator = ctx.getDelegator(); String templateName = (String) context.get("templateName"); - Map<String, Object> templateData = UtilGenerics.checkMap(context.get("templateData")); + Map<String, Object> templateData = UtilGenerics.cast(context.get("templateData")); String webSiteId = (String) context.get("webSiteId"); Locale locale = (Locale) context.get("locale"); Map<String, Object> result = null; 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -145,7 +145,7 @@ public final class ContextHelper { } public Map<String, Object> getParameters() { - Map<String, Object> parameters = UtilGenerics.checkMap(this.context.getAttribute(ScriptUtil.PARAMETERS_KEY)); + Map<String, Object> parameters = UtilGenerics.cast(this.context.getAttribute(ScriptUtil.PARAMETERS_KEY)); if (parameters == null) { parameters = new LinkedHashMap<>(); this.context.setAttribute(ScriptUtil.PARAMETERS_KEY, parameters, ScriptContext.ENGINE_SCOPE); @@ -166,7 +166,7 @@ public final class ContextHelper { } public Map<String, Object> getResults() { - Map<String, Object> results = UtilGenerics.checkMap(this.context.getAttribute(ScriptUtil.RESULT_KEY)); + Map<String, Object> results = UtilGenerics.cast(this.context.getAttribute(ScriptUtil.RESULT_KEY)); if (results == null) { results = new LinkedHashMap<>(); this.context.setAttribute(ScriptUtil.RESULT_KEY, results, ScriptContext.ENGINE_SCOPE); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -60,7 +60,7 @@ public final class ScriptHelperImpl impl GenericValue tempVal = delegator.makeValue(modelEntity.getEntityName()); Object parametersObj = context.get("parameters"); if (parametersObj != null && parametersObj instanceof Map<?, ?>) { - tempVal.setAllFields(UtilGenerics.checkMap(parametersObj), true, null, Boolean.TRUE); + tempVal.setAllFields(UtilGenerics.cast(parametersObj), true, null, Boolean.TRUE); } tempVal.setAllFields(context, true, null, Boolean.TRUE); entityContext.putAll(tempVal); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -106,7 +106,7 @@ public class EntityConditionBuilder exte @Override protected Object createNode(Object methodName, @SuppressWarnings("rawtypes") Map mapArg) { - Map<String, Object> fieldValueMap = UtilGenerics.checkMap(mapArg); + Map<String, Object> fieldValueMap = UtilGenerics.cast(mapArg); String operatorName = ((String)methodName).toLowerCase(Locale.getDefault()); EntityComparisonOperator<String, Object> operator = EntityOperator.lookupComparison(operatorName); List<EntityCondition> conditionList = new LinkedList<>(); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -524,7 +524,7 @@ public final class SimpleMethod extends summaryErrorStringBuffer.append("; "); summaryErrorStringBuffer.append(errorMsgList.toString()); } - Map<String, Object> errorMsgMap = UtilGenerics.checkMap(methodContext.getEnv(serviceErrorMessageMapName)); + Map<String, Object> errorMsgMap = UtilGenerics.cast(methodContext.getEnv(serviceErrorMessageMapName)); if (UtilValidate.isNotEmpty(errorMsgMap)) { methodContext.putResult(ModelService.ERROR_MESSAGE_MAP, errorMsgMap); forceError = true; Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelNotification.java Sat Jul 20 16:32:34 2019 @@ -60,7 +60,7 @@ public class ModelNotification { } public Map<String, Object> buildContext(Map<String, ? extends Object> context, Map<String, Object> result, ModelService model) throws GenericServiceException { - Map<String, Object> userLogin = UtilGenerics.checkMap(context.get("userLogin")); + Map<String, Object> userLogin = UtilGenerics.cast(context.get("userLogin")); String partyId = null; if (userLogin != null) { partyId = (String) userLogin.get("partyId"); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -135,7 +135,7 @@ public final class ServiceUtil { errorList.addAll(UtilGenerics.checkList(nestedResult.get(ModelService.ERROR_MESSAGE_LIST))); } if (nestedResult.get(ModelService.ERROR_MESSAGE_MAP) != null) { - errorMap.putAll(UtilGenerics.<String, Object>checkMap(nestedResult.get(ModelService.ERROR_MESSAGE_MAP))); + errorMap.putAll(UtilGenerics.cast(nestedResult.get(ModelService.ERROR_MESSAGE_MAP))); } } @@ -269,7 +269,7 @@ public final class ServiceUtil { } String errorMsg = (String) result.get(ModelService.ERROR_MESSAGE); List<? extends Object> errorMsgList = UtilGenerics.checkList(result.get(ModelService.ERROR_MESSAGE_LIST)); - Map<String, ? extends Object> errorMsgMap = UtilGenerics.checkMap(result.get(ModelService.ERROR_MESSAGE_MAP)); + Map<String, ? extends Object> errorMsgMap = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_MAP)); StringBuilder outMsg = new StringBuilder(); if (errorMsg != null) { @@ -389,7 +389,7 @@ public final class ServiceUtil { //See if there are an error message map if (callResult.containsKey(ModelService.ERROR_MESSAGE_MAP)) { - errorMsgMap = UtilGenerics.checkMap(callResult.get(ModelService.ERROR_MESSAGE_MAP)); + errorMsgMap = UtilGenerics.cast(callResult.get(ModelService.ERROR_MESSAGE_MAP)); targetMap.putAll(errorMsgMap); } } @@ -673,7 +673,7 @@ public final class ServiceUtil { throw new IllegalArgumentException("Arg(" + i + "), value(" + args[i] + ") is not a string."); } } - return UtilGenerics.checkMap(UtilMisc.toMap(args)); + return UtilGenerics.cast(UtilMisc.toMap(args)); } public static Map<String, Object> resetJob(DispatchContext dctx, Map<String, Object> context) { 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -134,7 +134,7 @@ public class ServiceEcaAction implements // put the results in to the defined map if (UtilValidate.isNotEmpty(resultMapName)) { - Map<String, Object> resultMap = UtilGenerics.checkMap(context.get(resultMapName)); + Map<String, Object> resultMap = UtilGenerics.cast(context.get(resultMapName)); if (resultMap == null) { resultMap = new HashMap<>(); } @@ -185,7 +185,7 @@ public class ServiceEcaAction implements 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)); - Map<String, ? extends Object> errorMessageMap = UtilGenerics.checkMap(actionResult.get(ModelService.ERROR_MESSAGE_MAP)); + Map<String, ? extends Object> errorMessageMap = UtilGenerics.cast(actionResult.get(ModelService.ERROR_MESSAGE_MAP)); // do something with the errorMessage if (UtilValidate.isNotEmpty(errorMessage)) { @@ -211,7 +211,7 @@ public class ServiceEcaAction implements } // do something with the errorMessageMap if (UtilValidate.isNotEmpty(errorMessageMap)) { - Map<String, Object> origErrorMessageMap = UtilGenerics.checkMap(result.get(ModelService.ERROR_MESSAGE_MAP)); + Map<String, Object> origErrorMessageMap = UtilGenerics.cast(result.get(ModelService.ERROR_MESSAGE_MAP)); if (origErrorMessageMap == null) { result.put(ModelService.ERROR_MESSAGE_MAP, errorMessageMap); } else { Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaCondition.java Sat Jul 20 16:32:34 2019 @@ -135,7 +135,7 @@ public class ServiceEcaCondition impleme if (UtilValidate.isNotEmpty(lhsMapName)) { try { if (context.containsKey(lhsMapName)) { - Map<String, ? extends Object> envMap = UtilGenerics.checkMap(context.get(lhsMapName)); + Map<String, ? extends Object> envMap = UtilGenerics.cast(context.get(lhsMapName)); lhsValue = envMap.get(lhsValueName); } else { Debug.logInfo("From Map (" + lhsMapName + ") not found in context, defaulting to null.", module); @@ -156,7 +156,7 @@ public class ServiceEcaCondition impleme } else if (UtilValidate.isNotEmpty(rhsMapName)) { try { if (context.containsKey(rhsMapName)) { - Map<String, ? extends Object> envMap = UtilGenerics.checkMap(context.get(rhsMapName)); + Map<String, ? extends Object> envMap = UtilGenerics.cast(context.get(rhsMapName)); rhsValue = envMap.get(rhsValueName); } else { Debug.logInfo("To Map (" + rhsMapName + ") not found in context for " + serviceName + ", defaulting to null.", module); Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaSetField.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaSetField.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaSetField.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/eca/ServiceEcaSetField.java Sat Jul 20 16:32:34 2019 @@ -69,7 +69,7 @@ public class ServiceEcaSetField { // check if target is a map and create/get from contaxt Map<String, Object> valueMap = null; if (UtilValidate.isNotEmpty(this.mapName) && context.containsKey(this.mapName)) { - valueMap = UtilGenerics.checkMap(context.get(mapName)); + valueMap = UtilGenerics.cast(context.get(mapName)); } else { valueMap = new HashMap<>(); } Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/HttpEngine.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/HttpEngine.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/HttpEngine.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/HttpEngine.java Sat Jul 20 16:32:34 2019 @@ -85,7 +85,7 @@ public class HttpEngine extends GenericA try { Object res = XmlSerializer.deserialize(postResult, dctx.getDelegator()); if (res instanceof Map<?, ?>) { - result = UtilGenerics.checkMap(res); + result = UtilGenerics.cast(res); } else { throw new GenericServiceException("Result not an instance of Map."); } @@ -135,7 +135,7 @@ public class HttpEngine extends GenericA try { Object o = XmlSerializer.deserialize(xmlContext, delegator); if (o instanceof Map<?, ?>) { - context = UtilGenerics.checkMap(o); + context = UtilGenerics.cast(o); } else { Debug.logError("Context not an instance of Map error", module); result.put(ModelService.ERROR_MESSAGE, "Context not an instance of Map"); Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/StandardJavaEngine.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/StandardJavaEngine.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/StandardJavaEngine.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/engine/StandardJavaEngine.java Sat Jul 20 16:32:34 2019 @@ -59,7 +59,7 @@ public final class StandardJavaEngine ex if (result == null || !(result instanceof Map<?, ?>)) { throw new GenericServiceException("Service [" + modelService.name + "] did not return a Map object"); } - return UtilGenerics.checkMap(result); + return UtilGenerics.cast(result); } // Invoke the static java method service. Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/jms/AbstractJmsListener.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/jms/AbstractJmsListener.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/jms/AbstractJmsListener.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/jms/AbstractJmsListener.java Sat Jul 20 16:32:34 2019 @@ -75,7 +75,7 @@ public abstract class AbstractJmsListene if (Debug.verboseOn()) Debug.logVerbose("De-Serialized Context --> " + o, module); if (ObjectType.instanceOf(o, "java.util.Map")) - context = UtilGenerics.checkMap(o); + context = UtilGenerics.cast(o); } catch (JMSException je) { Debug.logError(je, "Problems reading message.", module); } catch (Exception e) { Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Sat Jul 20 16:32:34 2019 @@ -700,13 +700,13 @@ public class RequestHandler { Map<String, Object> urlParams = null; if (session.getAttribute("_SAVED_VIEW_NAME_") != null) { viewName = (String) session.getAttribute("_SAVED_VIEW_NAME_"); - urlParams = UtilGenerics.<String, Object>checkMap(session.getAttribute("_SAVED_VIEW_PARAMS_")); + urlParams = UtilGenerics.cast(session.getAttribute("_SAVED_VIEW_PARAMS_")); } else if (session.getAttribute("_HOME_VIEW_NAME_") != null) { viewName = (String) session.getAttribute("_HOME_VIEW_NAME_"); - urlParams = UtilGenerics.<String, Object>checkMap(session.getAttribute("_HOME_VIEW_PARAMS_")); + urlParams = UtilGenerics.cast(session.getAttribute("_HOME_VIEW_PARAMS_")); } else if (session.getAttribute("_LAST_VIEW_NAME_") != null) { viewName = (String) session.getAttribute("_LAST_VIEW_NAME_"); - urlParams = UtilGenerics.<String, Object>checkMap(session.getAttribute("_LAST_VIEW_PARAMS_")); + urlParams = UtilGenerics.cast(session.getAttribute("_LAST_VIEW_PARAMS_")); } else if (UtilValidate.isNotEmpty(nextRequestResponse.value)) { viewName = nextRequestResponse.value; } @@ -751,7 +751,7 @@ public class RequestHandler { Map<String, Object> urlParams = null; if (session.getAttribute("_HOME_VIEW_NAME_") != null) { viewName = (String) session.getAttribute("_HOME_VIEW_NAME_"); - urlParams = UtilGenerics.<String, Object>checkMap(session.getAttribute("_HOME_VIEW_PARAMS_")); + urlParams = UtilGenerics.cast(session.getAttribute("_HOME_VIEW_PARAMS_")); } if (urlParams != null) { for (Map.Entry<String, Object> urlParamEntry: urlParams.entrySet()) { Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java Sat Jul 20 16:32:34 2019 @@ -39,6 +39,7 @@ import javax.servlet.http.HttpServletRes import javax.servlet.http.HttpSession; import org.apache.ofbiz.base.util.Debug; +import org.apache.ofbiz.base.util.UtilGenerics; import org.apache.ofbiz.base.util.UtilHttp; import org.apache.ofbiz.base.util.UtilProperties; import org.apache.ofbiz.base.util.UtilValidate; @@ -395,7 +396,7 @@ public class CoreEvents { servicePathMap = null; if (servicePathObject instanceof Map<?, ?>) { - servicePathMap = checkMap(servicePathObject); + servicePathMap = UtilGenerics.cast(servicePathObject); } else if (servicePathObject instanceof GenericEntity) { GenericEntity servicePathEntity = (GenericEntity)servicePathObject; servicePathMap = new HashMap<>(); Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ServiceEventHandler.java Sat Jul 20 16:32:34 2019 @@ -119,7 +119,7 @@ public class ServiceEventHandler impleme } Map<String, Object> rawParametersMap = UtilHttp.getCombinedMap(request); - Map<String, Object> multiPartMap = UtilGenerics.checkMap(request.getAttribute("multiPartMap")); + Map<String, Object> multiPartMap = UtilGenerics.cast(request.getAttribute("multiPartMap")); Set<String> urlOnlyParameterNames = UtilHttp.getUrlOnlyParameterMap(request).keySet(); Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/WebToolsServices.java Sat Jul 20 16:32:34 2019 @@ -119,7 +119,7 @@ public class WebToolsServices { String maintainTimeStamps = (String)context.get("maintainTimeStamps"); String createDummyFks = (String)context.get("createDummyFks"); String checkDataOnly = (String) context.get("checkDataOnly"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); Integer txTimeout = (Integer)context.get("txTimeout"); if (txTimeout == null) { @@ -222,7 +222,7 @@ public class WebToolsServices { String createDummyFks = (String) context.get("createDummyFks"); boolean deleteFiles = (String) context.get("deleteFiles") != null; String checkDataOnly = (String) context.get("checkDataOnly"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); Integer txTimeout = (Integer)context.get("txTimeout"); Long filePause = (Long)context.get("filePause"); @@ -333,7 +333,7 @@ public class WebToolsServices { String maintainTimeStamps = (String)context.get("maintainTimeStamps"); String createDummyFks = (String)context.get("createDummyFks"); String checkDataOnly = (String) context.get("checkDataOnly"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); Integer txTimeout = (Integer)context.get("txTimeout"); if (txTimeout == null) { @@ -442,7 +442,7 @@ public class WebToolsServices { String createDummyFks = (String) context.get("createDummyFks"); boolean deleteFiles = (String) context.get("deleteFiles") != null; String checkDataOnly = (String) context.get("checkDataOnly"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); Integer txTimeout = (Integer)context.get("txTimeout"); Long filePause = (Long)context.get("filePause"); @@ -658,7 +658,7 @@ public class WebToolsServices { boolean createDummyFks = (String) context.get("createDummyFks") != null; boolean checkDataOnly = (String) context.get("checkDataOnly") != null; Integer txTimeout = (Integer) context.get("txTimeout"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); if (txTimeout == null) { txTimeout = 7200; @@ -698,7 +698,7 @@ public class WebToolsServices { boolean createDummyFks = (String) context.get("createDummyFks") != null; boolean checkDataOnly = (String) context.get("checkDataOnly") != null; Integer txTimeout = (Integer) context.get("txTimeout"); - Map<String, Object> placeholderValues = UtilGenerics.checkMap(context.get("placeholderValues")); + Map<String, Object> placeholderValues = UtilGenerics.cast(context.get("placeholderValues")); if (txTimeout == null) { txTimeout = 7200; Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/artifactinfo/ControllerRequestArtifactInfo.java Sat Jul 20 16:32:34 2019 @@ -72,7 +72,7 @@ public class ControllerRequestArtifactIn } } - Map<String, ConfigXMLReader.RequestResponse> requestResponseMap = UtilGenerics.checkMap(this.requestInfoMap.requestResponseMap); + Map<String, ConfigXMLReader.RequestResponse> requestResponseMap = UtilGenerics.cast(this.requestInfoMap.requestResponseMap); for (ConfigXMLReader.RequestResponse response: requestResponseMap.values()) { if ("view".equals(response.type)) { String viewUri = response.value; Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java Sat Jul 20 16:32:34 2019 @@ -137,7 +137,7 @@ public final class WidgetWorker { WidgetWorker.makeHiddenFormLinkAnchor(writer, linkStyle, description, confirmation, modelFormField, request, response, context); // this is a bit trickier, since we can't do a nested form we'll have to put the link to submit the form in place, but put the actual form def elsewhere, ie after the big form is closed - Map<String, Object> wholeFormContext = UtilGenerics.checkMap(context.get("wholeFormContext")); + Map<String, Object> wholeFormContext = UtilGenerics.cast(context.get("wholeFormContext")); Appendable postMultiFormWriter = wholeFormContext != null ? (Appendable) wholeFormContext.get("postMultiFormWriter") : null; if (postMultiFormWriter == null) { postMultiFormWriter = new StringWriter(); @@ -351,7 +351,7 @@ public final class WidgetWorker { if (paginateNumberInt == null) { paginateNumberInt = 0; context.put("PAGINATOR_NUMBER", paginateNumberInt); - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { globalCtx.put("PAGINATOR_NUMBER", paginateNumberInt); } @@ -362,7 +362,7 @@ public final class WidgetWorker { } public static void incrementPaginatorNumber(Map<String, Object> context) { - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { Boolean NO_PAGINATOR = (Boolean) globalCtx.get("NO_PAGINATOR"); if (UtilValidate.isNotEmpty(NO_PAGINATOR)) { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java Sat Jul 20 16:32:34 2019 @@ -120,7 +120,7 @@ public final class WidgetContextCacheKey return false; } if ("parameters".equals(fieldName)) { - if (!parametersAreEqual(UtilGenerics.<String, Object>checkMap(field1), UtilGenerics.<String, Object>checkMap(field2))) { + if (!parametersAreEqual(UtilGenerics.cast(field1), UtilGenerics.cast(field2))) { return false; } continue; @@ -141,7 +141,7 @@ public final class WidgetContextCacheKey printableMap.put(fieldName.getKey(), fieldName.getValue()); } } - Map<String, Object> parameters = UtilGenerics.checkMap(this.context.get("parameters")); + Map<String, Object> parameters = UtilGenerics.cast(this.context.get("parameters")); return printMap(printableMap) + "\n" + printMap(parameters); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java Sat Jul 20 16:32:34 2019 @@ -475,7 +475,7 @@ public abstract class AbstractModelActio } } if (global) { - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { ResourceBundleMapWrapper globalExistingPropMap = this.mapNameAcsr.get(globalCtx); if (globalExistingPropMap == null) { @@ -912,7 +912,7 @@ public abstract class AbstractModelActio } } if (global) { - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { this.field.put(globalCtx, newValue); } else { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/IterateSectionWidget.java Sat Jul 20 16:32:34 2019 @@ -204,7 +204,7 @@ public class IterateSectionWidget extend if (getPaginate(context)) { try { Integer lastPageNumber = null; - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { lastPageNumber = (Integer)globalCtx.get("PAGINATOR_NUMBER"); globalCtx.put("PAGINATOR_NUMBER", startPageNumber); @@ -244,7 +244,7 @@ public class IterateSectionWidget extend targetService = "${targetService}"; } - Map<String, Object> inputFields = UtilGenerics.checkMap(context.get("requestParameters")); + Map<String, Object> inputFields = UtilGenerics.cast(context.get("requestParameters")); Object obj = context.get("queryStringMap"); Map<String, Object> queryStringMap = (obj instanceof Map) ? UtilGenerics.cast(obj) : null; if (UtilValidate.isNotEmpty(queryStringMap)) { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormAction.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormAction.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormAction.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelFormAction.java Sat Jul 20 16:32:34 2019 @@ -190,7 +190,7 @@ public abstract class ModelFormAction { Map<String, Object> serviceContext = null; if (autoFieldMapBool) { if (!"true".equals(autoFieldMapString)) { - Map<String, Object> autoFieldMap = UtilGenerics.checkMap(context.get(autoFieldMapString)); + Map<String, Object> autoFieldMap = UtilGenerics.cast(context.get(autoFieldMapString)); serviceContext = WidgetWorker.getDispatcher(context).getDispatchContext() .makeValidContext(serviceNameExpanded, ModelService.IN_PARAM, autoFieldMap); } else { 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -351,7 +351,7 @@ public class ModelFormField { // this is a special case to fill in fields during a create by default from parameters passed in if (dataMapIsContext && retVal == null && !Boolean.FALSE.equals(useRequestParameters)) { - Map<String, ? extends Object> parameters = UtilGenerics.checkMap(context.get("parameters")); + Map<String, ? extends Object> parameters = UtilGenerics.cast(context.get("parameters")); if (parameters != null) { if (UtilValidate.isNotEmpty(this.entryAcsr)) { retVal = this.entryAcsr.get(parameters); @@ -650,7 +650,7 @@ public class ModelFormField { } // search for a localized label for the field's name - Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, String> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { String titleFieldName = "FormFieldTitle_" + this.name; String localizedName = uiLabelMap.get(titleFieldName); @@ -3078,7 +3078,7 @@ public class ModelFormField { if (UtilValidate.isNotEmpty(this.listEntryName)) { localContext.put(this.listEntryName, data); } else { - Map<String, Object> dataMap = UtilGenerics.checkMap(data); + Map<String, Object> dataMap = UtilGenerics.cast(data); localContext.putAll(dataMap); } Object keyObj = keyAcsr.get(localContext); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java Sat Jul 20 16:32:34 2019 @@ -188,7 +188,7 @@ public abstract class ModelMenuAction { } if (global) { - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); if (globalCtx != null) { this.field.put(globalCtx, newValue); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java Sat Jul 20 16:32:34 2019 @@ -600,7 +600,7 @@ public abstract class ModelScreenWidget boolean collapsed = getInitiallyCollapsed(context); if (this.collapsible) { String preferenceKey = getPreferenceKey(context) + "_collapsed"; - Map<String, Object> requestParameters = UtilGenerics.checkMap(context.get("requestParameters")); + Map<String, Object> requestParameters = UtilGenerics.cast(context.get("requestParameters")); if (requestParameters != null) { String collapsedParam = (String) requestParameters.get(preferenceKey); if (collapsedParam != null) { @@ -628,7 +628,7 @@ public abstract class ModelScreenWidget //initially-collapsed status, which may be overriden by user preference public boolean getInitiallyCollapsed(Map<String, Object> context) { String screenletId = this.getId(context) + "_collapsed"; - Map<String, ? extends Object> userPreferences = UtilGenerics.checkMap(context.get("userPreferences")); + Map<String, ? extends Object> userPreferences = UtilGenerics.cast(context.get("userPreferences")); if (userPreferences != null && userPreferences.containsKey(screenletId)) { return Boolean.valueOf((String) userPreferences.get(screenletId)); } @@ -942,7 +942,7 @@ public abstract class ModelScreenWidget @Override public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException { - Map<String, ? extends Object> preRenderedContent = UtilGenerics.checkMap(context.get("preRenderedContent")); + Map<String, ? extends Object> preRenderedContent = UtilGenerics.cast(context.get("preRenderedContent")); if (preRenderedContent != null && preRenderedContent.containsKey(getName())) { try { writer.append((String) preRenderedContent.get(getName())); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -180,7 +180,7 @@ public class ModelTree extends ModelWidg } } //append also the request parameters - Map<String, Object> paramMap = UtilGenerics.checkMap(context.get("requestParameters")); + Map<String, Object> paramMap = UtilGenerics.cast(context.get("requestParameters")); if (UtilValidate.isNotEmpty(paramMap)) { Map<String, Object> requestParameters = new HashMap<>(paramMap); requestParameters.remove(this.getTrailName(context)); @@ -231,7 +231,7 @@ public class ModelTree extends ModelWidg @SuppressWarnings("rawtypes") public void renderTreeString(Appendable writer, Map<String, Object> context, TreeStringRenderer treeStringRenderer) throws GeneralException { - Map<String, Object> parameters = UtilGenerics.checkMap(context.get("parameters")); + Map<String, Object> parameters = UtilGenerics.cast(context.get("parameters")); ModelNode node = nodeMap.get(rootNodeName); String trailName = trailNameExdr.expandString(context); String treeString = (String) context.get(trailName); @@ -590,7 +590,7 @@ public class ModelTree extends ModelWidg int newDepth = depth + 1; for (Object[] arr : subNodeValues) { ModelNode node = (ModelNode) arr[0]; - Map<String, Object> val = UtilGenerics.checkMap(arr[1]); + Map<String, Object> val = UtilGenerics.cast(arr[1]); String thisPkName = node.getPkName(context); String thisEntityId = (String) val.get(thisPkName); MapStack<String> newContext = MapStack.create(context); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -433,7 +433,7 @@ public abstract class ModelTreeAction ex if (UtilValidate.isNotEmpty(valueName)) { context.put(valueName, result.get(resultMapValueName)); } else { - Map<String, Object> resultMap = UtilGenerics.checkMap(result.get(resultMapValueName)); + Map<String, Object> resultMap = UtilGenerics.cast(result.get(resultMapValueName)); context.putAll(resultMap); } } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidget.java Sat Jul 20 16:32:34 2019 @@ -140,7 +140,7 @@ public abstract class ModelWidget implem if (str != null) { result = "true".equals(str); } else { - Map<String, ? extends Object> parameters = UtilGenerics.checkMap(context.get("parameters")); + Map<String, ? extends Object> parameters = UtilGenerics.cast(context.get("parameters")); if (parameters != null) { str = (String) parameters.get(enableBoundaryCommentsParam); if (str != null) { Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java Sat Jul 20 16:32:34 2019 @@ -730,7 +730,7 @@ public class FormRenderer { continue; } - Map<String, Object> itemMap = UtilGenerics.checkMap(item); + Map<String, Object> itemMap = UtilGenerics.cast(item); MapStack<String> localContext = MapStack.create(context); if (UtilValidate.isNotEmpty(modelForm.getListEntryName())) { localContext.put(modelForm.getListEntryName(), item); 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=1863500&r1=1863499&r2=1863500&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:32:34 2019 @@ -90,7 +90,7 @@ public class MenuWrapTransform implement final Map<String, Object> savedValuesUp = new HashMap<>(); FreeMarkerWorker.saveContextValues(templateCtx, upSaveKeyNames, savedValuesUp); - Map<String, Object> checkedArgs = UtilGenerics.checkMap(args); + Map<String, Object> checkedArgs = UtilGenerics.cast(args); FreeMarkerWorker.overrideWithArgs(templateCtx, checkedArgs); List<Map<String, ? extends Object>> trail = UtilGenerics.checkList(templateCtx.get("globalNodeTrail")); String contentAssocPredicateId = (String)templateCtx.get("contentAssocPredicateId"); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java Sat Jul 20 16:32:34 2019 @@ -72,7 +72,7 @@ public final class Paginator { List<?> items = (List<?>) entryList; listSize = items.size(); if(context.containsKey("result")){ - Map<String, Object> resultMap = UtilGenerics.checkMap(context.get("result")); + Map<String, Object> resultMap = UtilGenerics.cast(context.get("result")); if(resultMap.containsKey("listSize")){ listSize = (int)resultMap.get("listSize"); } Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Sat Jul 20 16:32:34 2019 @@ -483,7 +483,7 @@ public final class MacroFormRenderer imp if (textareaField.isReadOnly()) { readonly = "readonly"; } - Map<String, Object> userLogin = UtilGenerics.checkMap(context.get("userLogin")); + Map<String, Object> userLogin = UtilGenerics.cast(context.get("userLogin")); String language = "en"; if (userLogin != null) { language = UtilValidate.isEmpty((String) userLogin.get("lastLocale")) ? "en" : (String) userLogin.get("lastLocale"); @@ -565,7 +565,7 @@ public final class MacroFormRenderer imp } timeValues.append("]"); } - Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, String> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap == null) { Debug.logWarning("Could not find uiLabelMap in context", module); } @@ -1495,7 +1495,7 @@ public final class MacroFormRenderer imp sr.append("<@renderMultiFormClose />"); executeMacro(writer, sr.toString()); // see if there is anything that needs to be added outside of the multi-form - Map<String, Object> wholeFormContext = UtilGenerics.checkMap(context.get("wholeFormContext")); + Map<String, Object> wholeFormContext = UtilGenerics.cast(context.get("wholeFormContext")); Appendable postMultiFormWriter = wholeFormContext != null ? (Appendable) wholeFormContext.get("postMultiFormWriter") : null; if (postMultiFormWriter != null) { writer.append(postMultiFormWriter.toString()); @@ -1509,7 +1509,7 @@ public final class MacroFormRenderer imp @Override public void renderFormatListWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException { - Map<String, Object> inputFields = UtilGenerics.checkMap(context.get("requestParameters")); + Map<String, Object> inputFields = UtilGenerics.cast(context.get("requestParameters")); Object obj = context.get("queryStringMap"); Map<String, Object> queryStringMap = (obj instanceof Map) ? UtilGenerics.cast(obj) : null; if (UtilValidate.isNotEmpty(queryStringMap)) { @@ -2041,7 +2041,7 @@ public final class MacroFormRenderer imp String opUpThruDay = UtilProperties.getMessage("conditionalUiLabels", "up_thru_day", locale); String opIsEmpty = UtilProperties.getMessage("conditionalUiLabels", "is_empty", locale); String conditionGroup = modelFormField.getConditionGroup(); - Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, String> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap == null) { Debug.logWarning("Could not find uiLabelMap in context", module); } @@ -2099,7 +2099,7 @@ public final class MacroFormRenderer imp value2 = ""; } if (context.containsKey("parameters")) { - Map<String, Object> parameters = UtilGenerics.checkMap(context.get("parameters")); + Map<String, Object> parameters = UtilGenerics.cast(context.get("parameters")); if (parameters.containsKey(name + "_fld0_value")) { value = (String) parameters.get(name + "_fld0_value"); } @@ -2270,7 +2270,7 @@ public final class MacroFormRenderer imp } Boolean isInitiallyCollapsed = lookupField.getInitiallyCollapsed(); String clearText = ""; - Map<String, Object> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { clearText = (String) uiLabelMap.get("CommonClear"); } else { @@ -2395,7 +2395,7 @@ public final class MacroFormRenderer imp int highIndex = Paginator.getHighIndex(context); int actualPageSize = Paginator.getActualPageSize(context); // needed for the "Page" and "rows" labels - Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, String> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); String pageLabel = ""; String commonDisplaying = ""; if (uiLabelMap == null) { @@ -2779,7 +2779,7 @@ public final class MacroFormRenderer imp String collapseToolTip = ""; if (UtilValidate.isNotEmpty(style) || UtilValidate.isNotEmpty(id) || UtilValidate.isNotEmpty(title)) { if (fieldGroup.collapsible()) { - Map<String, Object> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); + Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); if (uiLabelMap != null) { expandToolTip = (String) uiLabelMap.get("CommonExpand"); collapseToolTip = (String) uiLabelMap.get("CommonCollapse"); @@ -3015,8 +3015,8 @@ public final class MacroFormRenderer imp sb.append(this.rh.makeLink(this.request, this.response,urlPath)).append(","); String queryString = UtilHttp.getQueryStringFromTarget(ajaxTarget).replace("?", ""); Map<String, Object> parameters = UtilHttp.getQueryStringOnlyParameterMap(queryString); - Map<String, Object> ctx = UtilGenerics.checkMap(context); - Map<String, Object> updateParams = UtilGenerics.checkMap(updateArea.getParameterMap(ctx)); + Map<String, Object> ctx = UtilGenerics.cast(context); + Map<String, Object> updateParams = UtilGenerics.cast(updateArea.getParameterMap(ctx)); parameters.putAll(updateParams); UtilHttp.canonicalizeParameterMap(parameters); parameters.putAll(extraParams); @@ -3059,7 +3059,7 @@ public final class MacroFormRenderer imp } else { ajaxUrl += ","; } - Map<String, Object> ctx = UtilGenerics.checkMap(context); + Map<String, Object> ctx = UtilGenerics.cast(context); Map<String, String> parameters = updateArea.getParameterMap(ctx); String targetUrl = updateArea.getAreaTarget(context); String ajaxParams; @@ -3191,7 +3191,7 @@ public final class MacroFormRenderer imp if ("multi".equals(modelForm.getType())) { WidgetWorker.makeHiddenFormLinkAnchor(writer, linkStyle, encodedDescription, confirmation, modelFormField, request, response, context); // this is a bit trickier, since we can't do a nested form we'll have to put the link to submit the form in place, but put the actual form def elsewhere, ie after the big form is closed - Map<String, Object> wholeFormContext = UtilGenerics.checkMap(context.get("wholeFormContext")); + Map<String, Object> wholeFormContext = UtilGenerics.cast(context.get("wholeFormContext")); Appendable postMultiFormWriter = wholeFormContext != null ? (Appendable) wholeFormContext.get("postMultiFormWriter") : null; if (postMultiFormWriter == null) { postMultiFormWriter = new StringWriter(); Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenRenderer.java Sat Jul 20 16:32:34 2019 @@ -627,8 +627,8 @@ public class MacroScreenRenderer impleme showMore = true; if (collapsible) { this.getNextElementId(); - Map<String, Object> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap")); - Map<String, Object> paramMap = UtilGenerics.checkMap(context.get("requestParameters")); + Map<String, Object> uiLabelMap = UtilGenerics.cast(context.get("uiLabelMap")); + Map<String, Object> paramMap = UtilGenerics.cast(context.get("requestParameters")); Map<String, Object> requestParameters = new HashMap<>(paramMap); if (uiLabelMap != null) { expandToolTip = (String) uiLabelMap.get("CommonExpand"); @@ -689,7 +689,7 @@ public class MacroScreenRenderer impleme VisualTheme visualTheme = UtilHttp.getVisualTheme(request); ModelTheme modelTheme = visualTheme.getModelTheme(); if (request != null && response != null) { - Map<String, Object> globalCtx = UtilGenerics.checkMap(context.get("globalContext")); + Map<String, Object> globalCtx = UtilGenerics.cast(context.get("globalContext")); globalCtx.put("NO_PAGINATOR", true); FormStringRenderer savedRenderer = (FormStringRenderer) context.get("formStringRenderer"); MacroFormRenderer renderer = null; Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java?rev=1863500&r1=1863499&r2=1863500&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroTreeRenderer.java Sat Jul 20 16:32:34 2019 @@ -140,7 +140,7 @@ public class MacroTreeRenderer implement String entityId = null; String entryName = node.getEntryName(); if (UtilValidate.isNotEmpty(entryName)) { - Map<String, String> map = UtilGenerics.checkMap(context.get(entryName)); + Map<String, String> map = UtilGenerics.cast(context.get(entryName)); entityId = map.get(pkName); } else { entityId = (String) context.get(pkName); |
Free forum by Nabble | Edit this page |